Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

y axis always has a yrange [0:*] with autoscale

2,854 views
Skip to first unread message

ervson

unread,
Nov 25, 2011, 6:16:32 AM11/25/11
to
Hi,
I try to plot some data with gnuplot an I have a problem with the
autoscaling.
When I try to plot my data gnuplot always sets the minimum of the y
axis at "0". In my file there isn't any data with a value of 0. Indeed
it starts with a y value of 15.
Typing "show autoscale" gnuplot says that autoscale is ON for every
axis. The autoscale of the x axis works fine.

I just can't find any mistake but I have to say, that I'm rather new
to gnuplot.

So here's what I try to plot:

reset
M_N= 0.800
unset key
set style line 1 lt -1 lc "black" lw 5
set terminal unknown
set autoscale
plot "DATA.PKT"
MIN_Y=GPVAL_DATA_Y_MIN
set terminal pdf enhanced font "Helvetica" size 11.6,8.2
set output "DATA.pdf"
set yrange [MIN_Y-ABSTAND:MAX_Y+ABSTAND]
plot "DATA.PKT" w filledcurve y1=MIN_Y ls 1 fs solid 0.2 border

Maybe someone can help me :-)

Ervson

ervson

unread,
Nov 25, 2011, 9:17:17 AM11/25/11
to
>set yrange [MIN_Y-ABSTAND:MAX_Y+ABSTAND]

oh sorry of course the set yrange isn't supposed to be there ....
that's how i tried to handle my problem, but i'd rather like it to be
autoscaled

sfeam

unread,
Nov 25, 2011, 5:26:31 PM11/25/11
to
I can't be sure, particularly since I haven't seen your data.
But you might try
"set auto fix"
This disables the default action of extending the axis ranges to
the nearest axis tick label. I.e. if your y tick marks were set
to every 20, then the next lower tick from 15 would be 0, which
might be what you are seeing.

ervson

unread,
Nov 30, 2011, 7:49:34 AM11/30/11
to

> I can't be sure, particularly since I haven't seen your data.
> But you might try
>     "set auto fix"
> This disables the default action of extending the axis ranges to
> the nearest axis tick label.  I.e. if your y tick marks were set
> to every 20, then the next lower tick from 15 would be 0, which
> might be what you are seeing.

Thank you for your response, but that doesn't solve my problem.
But using the "set auto fix" option works fine again for the x axis
and the upper part of the y axis.
The bottom part of the y axis still is "frozen" at 0

The data looks like this:
-1.021471 15.04952
-0.9511300 15.06803
-0.9183284 15.08654
-0.8951023 15.10505
-0.8766517 15.12356
-0.8612391 15.14207
-0.8488707 15.16058
-0.8377131 15.17909
-0.8284200 15.19760
-0.8204613 15.21611
-0.8131117 15.23462
-0.8068662 15.25313
-0.8013561 15.27164
-0.7967175 15.29015
-0.7924354 15.30866
.......... etc

so i also have a small variation around the value 15



ab

unread,
Dec 1, 2011, 2:57:03 AM12/1/11
to
Hi,

when i plot the data you posted, the result is fine, y-axis starts
at 15.
try

show all

after plotting. you should see a line like
set yrange [ * : * ] noreverse nowriteback # (currently
[15.0000:15.3500] )

ervson

unread,
Dec 1, 2011, 8:16:16 AM12/1/11
to
Thank you for your response!

I plotted the data again and it says:

set yrange [*:*] noreverse nowriteback # (currently [0.00000:16:0000])

Now I discovered that the problem results from the fillecurves option.
When I plot it without the filledcurves option it works fine just like
you said.
But the thing is that I want the curve to be filled...

sfeam

unread,
Dec 1, 2011, 2:16:44 PM12/1/11
to
plot 'data' with lines, 'data' noautoscale with filledcurves

The first plot with lines is just to get the proper autoscaling.
Then you turn it off again for the filledcurves plot.

(I don't know why autoscaling behaves strangely with filledcurves;
it doesn't act that way in the development version of gnuplot).
0 new messages