|
From: Dima K. <gn...@di...> - 2017-08-15 19:39:32
|
sfeam <sf...@us...> writes: > On Monday, 14 August 2017 21:13:00 Dima Kogan wrote: >> Hi. These days a common plotting use case for me is to draw an image >> from a file, with some data plotted on top of it. I do something like >> this: >> >> plot "xxx.png" binary filetype=auto flipy with rgbimage, "yyy" with points palette, ... >> >> This works OK. There's an annoyance however: the points in "yyy" have a >> 3rd column, rendered as a color, and I want gnuplot to autoscale these >> colors. But the pixels in "xxx.png" also have colors and gnuplot >> interprets these colors as data too, and these 0-255 color values are >> included in the autoscaling along with the 3rd column in "yyy". So for >> instance, if the 3rd column in "yyy" is in [0-1], then the image is >> plotted normally, but the "yyy" points all look black. Conversely, if >> the points in "yyy" are in [10000-20000], then the points all look >> yellow and the image is all black. >> >> Is there a way to instruct gnuplot to just plot the image as is, without >> trying to interpret the pixel colors as data? If not, can we add such an >> option? The current behavior is definitely good for some use cases, but >> not for all of them. > > Right now the program ignores the "noautoscale" keyword for image plots. > I'm not sure what would happen if that were to change. > If you experiment with the code, that's where I suggest starting. "noautoscale" applies to the whole plot, does it not? I think what would be most appropriate here is some sort of "origcolors" option applicable only to rgbimage/image data sources. So autoscaling would still apply, but would ignore "origcolors" data. Does that make sense? |