|
From: Dima K. <gn...@di...> - 2018-07-25 18:01:17
|
sfeam <sf...@us...> writes:
> I think you are mis-interpreting the normal operation of PM3D as
> interpolation. PM3D operates on quadrangles. Each quadrangle has
> four corners. Each corner has a color. What color should be used for
> the quadrangle? There are many choices and the command that selects one
> of the options is
>
> set pm3d corners2color
> { mean|geomean|harmean|rms|median|min|max|c1|c2|c3|c4 }
>
> The default option is "mean", and I guess that is what you are calling
> interpolation. If you want each grid point in your original data to
> be the sole color source for a pm3d quadrangle ("pixel" if you are
> thinking of this as an image) then you want
> set pm3d corners2color c1 (or c2 or c3 or c4)
Aha. Yes. That does sorta what I want. Except it shifts the image by 0.5
pixels in each direction. I understand why, but it's not ideal.
>> >> is there overhead for using pm3d in this case? Size? Speed? If there's
>> >> no overhead, can 'splot with image' simply map to 'splot with pm3d'?
>
> Many of the output devices can handle image data as a special case.
> The corresponding gnuplot driver can define a rectangular area and then
> pass only an array of color values to the device. This is obviously a much
> smaller output stream than if the driver must output separate coordinates
> and color information for every pixel. So in general the size of the
> output stream increases in the order
>
> "with image" < "with pm3d" ~= "with image pixels"
OK. I forgot "with image pixels" existed. And just found an unrelated
(likely) bug: plotting the test data in this thread "with image" and
"with image pixels" produces slightly different images: the "with image"
version has each pixel centered not-quite at the correct locations. I
bet there's an off-by-one error in the "with image" code that makes the
coordinate mapping off slightly. I'll try to look at it when I get the
chance.
> I am thinking that we could use the command
>
> set pm3d {explicit|implicit}
>
> as a model for opt-in contours. As it is now, "set contours" causes
> all subsequent plots to use contours unless they cannot be contoured
> or they opt out with "nocontour". This is the equivalent of the
> state produced by "set pm3d implicit". It might work to add a command
> "set contours explicit" as we have for pm3d, meaning that subsequent
> plots are only contoured if they use an explicit plot style "contours".
>
> I don't think such a change would allow you to create any plot that you
> cannot already create, but perhaps making "set pm3d" and "set contours"
> more similar would be easier them both easier to understand.
> What do you think?
I think that extra bit of user control would definitely be welcome.
Thanks.
dima
|