Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #1560
| From | sfeam <sfeam@users.sourceforge.net> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Re: Image or special files do not work on y2 axis? |
| Followup-To | comp.graphics.apps.gnuplot |
| Date | 2012-12-29 14:15 -0800 |
| Organization | gnuplot development team |
| Message-ID | <kbnq29$kqb$1@dont-email.me> (permalink) |
| References | <ak8bmvFf1e8U1@mid.individual.net> |
Followups directed to: comp.graphics.apps.gnuplot
Ingo Thies wrote: > Dear all, > > I am currently trying to trick a gradient fill below a curve by the > following method: > > f(x)=-x*x+1. > xmin=-1.;xmax=1. > ymin=0.;ymax=1.2 > set xrange [xmin:xmax];set cbrange [xmin:xmax] > set y2range [0:1]#dummy yrange > #set palette defined ( 0 "blue", 3 "green", 6 "yellow", 10 "red" ) > set palette file 'RGB_palettes/rainbow.gpf' u 1:2:3:4; set xrange > [xmin:xmax];set cbrange [xmin:xmax] > #set yrange [ymin:ymax]#actual yrange using y2 axis > set yrange [0:*] > unset colorbox > unset y2tics; set ytics autofreq > plot '++' using 1:2:1 axes x1y2 with image,\ > f(x) axes x1y1 notitle w filledcurves below y1=ymax lc rgb "white",\ > f(x) axes x1y1 t 'f(x)' w l lc rgb "#000000" > > While this works without problem for the "palette defined ..." method > it fails for "palette file ...", with an error message "y range is > invalid". However, if I exchange y1 and y2 axes it works. My guess: > gnuplot can define file dummy files of the type '++' and similar > properly only if axes x1y1 is used. Otherwise the palette > specification fails. Did I found a bug here? Or is there a bug in the > script above? I believe the problem is that autoscaling (set yrange [0:*]) cannot be combined with either sampling (plot '++' ...) It requires an explicit range over which the samples are generated. If I add an explicit range before the plot command so that the sampling is well defined, then I find that your plot command works with either the the y1 or y2 axis. set palette defined ... # either this set palette file ... # or this plot [xmin:xmax][ymin:ymax] '++' using 1:2:1 axes x1y2 with image,\ f(x) axes x1y1 notitle w filledcurves below y1=ymax lc rgb "white",\ f(x) axes x1y1 t 'f(x)' w l lc rgb "#000000" pause -1 plot [xmin:xmax][ymin:ymax] '++' using 1:2:1 axes x1y1 with image,\ f(x) axes x1y2 notitle w filledcurves below y2=ymax lc rgb "white",\ f(x) axes x1y2 t 'f(x)' w l lc rgb "#000000" I don't think the palette definition is relevant here.
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Next in thread | Find similar
Image or special files do not work on y2 axis? Ingo Thies <ingo.thies@gmx.de> - 2012-12-29 15:06 +0100
Re: Image or special files do not work on y2 axis? sfeam <sfeam@users.sourceforge.net> - 2012-12-29 14:15 -0800
Re: Image or special files do not work on y2 axis? Ingo Thies <ingo.thies@gmx.de> - 2012-12-30 11:12 +0100
Re: Image or special files do not work on y2 axis? sfeam <sfeam@users.sourceforge.net> - 2012-12-31 12:09 -0800
Re: Image or special files do not work on y2 axis? Ingo Thies <ingo.thies@gmx.de> - 2013-01-01 13:36 +0100
csiph-web