more space for xtics

View: New views
6 Messages — Rating Filter:   Alert me  

more space for xtics

by mazeika :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Folks,

Is there any way I can increase the vertical space for xtics in gnuplot? It seems that gnuplot gives a fixed amount of vertical space for the xtics independent of the size of the labels. Consider the following data:

1 1
10 2
100 3
1000 4
10000 5

and the following commands:

set style data histogram
set xtics rotate by -90
plot 'b.data' u 2:xtic(1)

Everything that has more than 4 characters does not fit at the bottom. Any ideas?

Re: more space for xtics

by Thomas Sefzick :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

set bmargin

mazeika wrote:
Folks,

Is there any way I can increase the vertical space for xtics in gnuplot? It seems that gnuplot gives a fixed amount of vertical space for the xtics independent of the size of the labels. Consider the following data:

1 1
10 2
100 3
1000 4
10000 5

and the following commands:

set style data histogram
set xtics rotate by -90
plot 'b.data' u 2:xtic(1)

Everything that has more than 4 characters does not fit at the bottom. Any ideas?

Re: more space for xtics

by mazeika :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Thanks for the help. bmargin can take only positive numbers, and does not move the margin for negative ones... I was not able to increase space with bmargin..



set bmargin

mazeika wrote:
Folks,

Is there any way I can increase the vertical space for xtics in gnuplot? It seems that gnuplot gives a fixed amount of vertical space for the xtics independent of the size of the labels. Consider the following data:

1 1
10 2
100 3
1000 4
10000 5

and the following commands:

set style data histogram
set xtics rotate by -90
plot 'b.data' u 2:xtic(1)

Everything that has more than 4 characters does not fit at the bottom. Any ideas?


Re: more space for xtics

by Thomas Sefzick :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

which terminal are you using?
what does your complete plot script look like?

i can't reproduce the behaviour you describe with a
x11 terminal.


Hi,

Thanks for the help. bmargin can take only positive numbers, and does not move the margin for negative ones... I was not able to increase space with bmargin..


Thomas Sefzick wrote:
set bmargin

mazeika wrote:
Folks,

Is there any way I can increase the vertical space for xtics in gnuplot? It seems that gnuplot gives a fixed amount of vertical space for the xtics independent of the size of the labels. Consider the following data:

1 1
10 2
100 3
1000 4
10000 5

and the following commands:

set style data histogram
set xtics rotate by -90
plot 'b.data' u 2:xtic(1)

Everything that has more than 4 characters does not fit at the bottom. Any ideas?

Re: more space for xtics

by mazeika :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Good point. In short, x11 terminal always ``eats'' the last character of the longest string. eps does not allocate the space correctly too. png is very problematic.

The script:

set terminal postscript eps
#set terminal x11
#set terminal png
set output 'b.eps'
set style data histogram
set style fill solid
set xtics rotate by -90

plot 'b.data' u 2:xtic(1)

The data:

1 1
10 2
100 3
1000 4
10000 5
100000 6

(added one more line). The version of gnuplot on debian etch:

$ gnuplot --version
gnuplot 4.2 patchlevel 2

The x11 output:


The eps output:


The png output:


real world example (eps terminal):



which terminal are you using?
what does your complete plot script look like?

i can't reproduce the behaviour you describe with a
x11 terminal.


Hi,

Thanks for the help. bmargin can take only positive numbers, and does not move the margin for negative ones... I was not able to increase space with bmargin..


Thomas Sefzick wrote:
set bmargin

mazeika wrote:
Folks,

Is there any way I can increase the vertical space for xtics in gnuplot? It seems that gnuplot gives a fixed amount of vertical space for the xtics independent of the size of the labels. Consider the following data:

1 1
10 2
100 3
1000 4
10000 5

and the following commands:

set style data histogram
set xtics rotate by -90
plot 'b.data' u 2:xtic(1)

Everything that has more than 4 characters does not fit at the bottom. Any ideas?


Re: more space for xtics

by Thomas Sefzick :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

there's the problem:

> gnuplot 4.2 patchlevel 2

with this version i'm also able to reproduce this behaviour.

you need at least gnuplot 4.2 patchlevel 3

see http://www.gnuplot.info/announce.4.2.3 :

New features, changes and fixes in gnuplot version 4.2.3
===========================================================
...
* CHANGE estimate the space for rotated tick labels on x and x2 axes


Good point. In short, x11 terminal always ``eats'' the last character of the longest string. eps does not allocate the space correctly too. png is very problematic.

The script:

set terminal postscript eps
#set terminal x11
#set terminal png
set output 'b.eps'
set style data histogram
set style fill solid
set xtics rotate by -90

plot 'b.data' u 2:xtic(1)

The data:

1 1
10 2
100 3
1000 4
10000 5
100000 6

(added one more line). The version of gnuplot on debian etch:

$ gnuplot --version
gnuplot 4.2 patchlevel 2

The x11 output:


The eps output:


The png output:


real world example (eps terminal):



which terminal are you using?
what does your complete plot script look like?

i can't reproduce the behaviour you describe with a
x11 terminal.

mazeika wrote:
Hi,

Thanks for the help. bmargin can take only positive numbers, and does not move the margin for negative ones... I was not able to increase space with bmargin..


Thomas Sefzick wrote:
set bmargin

mazeika wrote:
Folks,

Is there any way I can increase the vertical space for xtics in gnuplot? It seems that gnuplot gives a fixed amount of vertical space for the xtics independent of the size of the labels. Consider the following data:

1 1
10 2
100 3
1000 4
10000 5

and the following commands:

set style data histogram
set xtics rotate by -90
plot 'b.data' u 2:xtic(1)

Everything that has more than 4 characters does not fit at the bottom. Any ideas?