|
From: Johannes Z. <joh...@ze...> - 2005-11-20 10:06:00
|
On Sun, Nov 20, 2005 at 02:30:56AM -0600, Daniel J Sebald wrote:
> Juergen Wieferink wrote:
> >Ethan A Merritt wrote:
> >
> >>Can anyone explain to me why the two surfaces produced
> >>by the command below are colored so differently?
> >>
> >> splot x with pm3d, y with pm3d
> >>
> >>The "y" surface is colored smoothly, but the "x"
> >>surface is colored in 9 increments only.
> >>What command would I use to get two smoothly
> >>colored surfaces?
> >
> >
> >This is a sampling issue. For the x-lines (scan lines) the setting
> >of "set samples" is used while for the y-lines the "set isosamples"
> >setting applies. This can be useful for surface plots, where the
> >x-lines will be smooth and adjacent x-lines are linearly connected
> >a few times. For pm3d this does not seem to be optimal.
>
> Oh yeah. Interchanging x and y in the example still results in the same
> sampling relationship, only one surface order is interchanged.
>
> Hmm, I guess I'm not following how this is useful for surface plots. Why
> should one dimension have any different meaning than the other dimension
> unless the user programs it to be that way? Is there an example in the
> demos somewhere that we can look at?
>
> So, I think I see what controls that, Ethan:
>
> set isosamples 128
>
> And by default it is 10.
>
> Now, am I understanding correctly that the isolines controls both the mesh
> spacing of the surface plot and the color gradient spacing of the pm3d?
> (Nothing in "help set isosamples" seems to suggest that.) If so, we should
> maybe discuss if that is good or bad.
>
> First it seems a bit confusing, or should I say non-obvious. Could
> independent parameters be less confusing? (Or the same parameter with
> qualifiers "surface" and "pm3d" somehow? E.g., "set surface isosamples",
> "set pm3d isosamples".)
If you think of "samples" and "isosamples" converting functions into data
points it's totally obvious. It's pretty straightforward that pm3d uses
the same sampling as any other plotting styles do. gnuplot offers just
one sampling which is common for all plots.
> Second, I could imagine a case where you wouldn't want those tied together.
> A lot of times people (like me) are concerned with adequately sampling a
> function or signal. Say one wanted to plot a function as a pm3d color
> "surface" and lay a mesh surface over the top to represent where the
> sampling locations might be. If "pm3d isosamples" is higher than the
> "surface isosamples" one may get insight to whether the sampling chosen is
> high enough resolution, i.e. greater than the Nyquist rate. On the other
> hand, if the two are always tied together, it's not so useful that way.
There might be cases where you want a different sampling for different
plotting styles. To be more rigorous: there might be cases where
different PLOTS should be sampled differently, something like
splot f(x, y) sampling 50:70 w pm3d, g(x, y) sampling 20:20 w lines
--
Johannes
|