|
From: Petr M. <mi...@ph...> - 2009-05-28 10:34:57
|
> IMHO gnuplot reacts as it should: > > > reset > > set ytics nomirror > > set logscale y > > set yrange [1:100] > > > > set y2tics nomirror > > set logscale y2 > > set y2range [1:100] > > > > plot 1+x*x > > everything looks right, the y*ranges are defined, > so it doesn't matter that the y2axis isn't used. > > > pause -1 > > > > set autoscale fix > > replot > > here, the defined y*ranges are forgotten, yrange is > calculated from the function values and then - because > y2tics is set - copied to the (not used!) y2axis, > where, in order to prevent errors (logscale y2 !), the 1 to > 100 yrange is converted into the 1e1 to 1e100 y2range. > (if yrange would be [0:100] it wouldn't be possible to > convert it into a log-range for y2axis, i think that's the > idea behind this conversion) > > keep in mind, that y2axis is plotted but not used. > > using both yaxes > > plot 1+x*x, 1+x*x axes x1y2 > > solves the problem. Those y2 tics were explicitly set, so "plot ... axes x1y2" should not be required. I use this for x+x2 axes in order to have axes with wavelength and energy, for example. The bug appears even if "set autoscale fix" appears *before* explicit y2range: reset set autoscale fix set ytics nomirror set logscale y set yrange [1:100] set y2tics nomirror set logscale y2 set y2range [1:100] plot 1+x*x --- PM |