|
From: Philipp K. J. <ja...@ie...> - 2008-02-22 03:06:26
|
When using
set pm3d hidden3d
with splot for plotting a function
it seems as if
- set samples n
is used for the number of steps along the x-direction
- set isosamples n,m
uses m for the number of steps along the y-direction
and ignores n. If only a single argument is given, it is
used for the y-direction.
Is this intended behaviour? I would have expected
set samples to have no effect on the plot. I also
would expect both arguments to set isosamples to
be evaluated.
This behaviour is only apparent if previously an
unset hidden3d command has been issued - otherwise
all seems fine.
Very mysterious.
Best,
Ph.
G N U P L O T
Version 4.2 patchlevel 2
last modified 31 Aug 2007
System: Linux 2.6.18.2-34-default
Copyright (C) 1986 - 1993, 1998, 2004, 2007
Thomas Williams, Colin Kelley and many others
Type `help` to access the on-line reference manual.
The gnuplot FAQ is available from http://www.gnuplot.info/faq/
Send bug reports and suggestions to
<http://sourceforge.net/projects/gnuplot>
Compile options:
-READLINE +LIBREADLINE +HISTORY +BACKWARDS_COMPATIBILITY +BINARY_DATA
+GD_PNG +GD_JPEG +GD_TTF +GD_GIF +ANIMATION
-NOCWDRC +X11 +X11_POLYGON +MULTIBYTE +USE_MOUSE +HIDDEN3D_QUADTREE
+DATASTRINGS +HISTOGRAMS +OBJECTS +STRINGVARS +MACROS +IMAGE
|
|
From: Ethan A M. <merritt@u.washington.edu> - 2008-02-22 03:47:40
|
On Thursday 21 February 2008 19:06, Philipp K. Janert wrote: > > When using > set pm3d hidden3d > with splot for plotting a function > > it seems as if > - set samples n > is used for the number of steps along the x-direction > - set isosamples n,m > uses m for the number of steps along the y-direction > and ignores n. If only a single argument is given, it is > used for the y-direction. I don't think that's right. "set isosamples XX,YY" causes the surface to be represented by XX lines with different x, and YY lines with different y. Try: set isosamples 10,50 splot (sin(x)*sin(y))/(x*y) set isosamples 50,10 replot So isosamples control the number of lines. For hidden surfaces, that's the end of the story so far as I know. For non-hidden surfaces, "set samples" controls how finely each line is sampled. So "set isosamples 5,5" will give you a small number of lines on x and y. "set samples 10,10" will make these lines very jagged; "set samples 100,100" will make these same lines much smoother. > I also would expect both arguments to set isosamples to be evaluated. For me both arguments work as expected. Tested both in 4.2 and CVS versions. -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle 98195-7742 |
|
From: Hans-Bernhard B. <HBB...@t-...> - 2008-02-22 23:15:57
|
Ethan A Merritt wrote:
> So isosamples control the number of lines.
> For hidden surfaces, that's the end of the story so far as I know.
Not quite. In hidden3d mode, the samples have to form a (topologically)
rectangular grid --- i.e. each isoline has the number of node specified
by the "opposite" isosamples settings:
set isosamples n,m
yields n isolines of m points each, and m "cross" isolines of n points each.
>> I also would expect both arguments to set isosamples to be evaluated.
They are --- but be aware that when you give only one, you set *both*.
More in 'help isosamples'.
|
|
From: Philipp K. J. <ja...@ie...> - 2008-02-22 05:20:31
|
Try this (all in one consecutive session): gnuplot> reset gnuplot> unset surface gnuplot> unset hidden3d gnuplot> set xlabel 'x' gnuplot> set ylabel 'y' gnuplot> set style line 1000 lt 1 gnuplot> set pm3d implicit hidden3d 1000 gnuplot> set samples 2 gnuplot> set isosamples 2 gnuplot> splot exp(-x**2-y**2) # totally flat gnuplot> set samples 3 gnuplot> replot # Now there are 3 nodes along the x-axis. # But why? What has set samples to do w/ splot? gnuplot> set isosamples 2,4 gnuplot> replot # Now there are still 3 (not 2!) nodes along the x-axis # and 4 along the y-axis. That's it. Gnuplot version info is attached to my original message on this subject. Best, Ph. On Thursday 21 February 2008 19:47, you wrote: > On Thursday 21 February 2008 19:06, Philipp K. Janert wrote: > > When using > > set pm3d hidden3d > > with splot for plotting a function > > > > it seems as if > > - set samples n > > is used for the number of steps along the x-direction > > - set isosamples n,m > > uses m for the number of steps along the y-direction > > and ignores n. If only a single argument is given, it is > > used for the y-direction. > > I don't think that's right. > "set isosamples XX,YY" causes the surface to be represented by > XX lines with different x, and YY lines with different y. > Try: > set isosamples 10,50 > splot (sin(x)*sin(y))/(x*y) > set isosamples 50,10 > replot > > So isosamples control the number of lines. > For hidden surfaces, that's the end of the story so far as I know. > > For non-hidden surfaces, "set samples" controls how finely each line is > sampled. So "set isosamples 5,5" will give you a small number of lines on > x and y. "set samples 10,10" will make these lines very jagged; "set > samples 100,100" will make these same lines much smoother. > > > I also would expect both arguments to set isosamples to be evaluated. > > For me both arguments work as expected. > Tested both in 4.2 and CVS versions. |
|
From: Thomas S. <t.s...@fz...> - 2008-02-22 14:09:14
|
if you plot 'with linespoints' (no pm3d) everything works: set isosamples n_iso_x,n_iso_y sets the number of "scanlines" in y- or x-direction, resp. set samples n_x,n_y set the number of points along the above "scanlines" an example: gnuplot> set samples 5,25 gnuplot> set isosamples 3,5 gnuplot> splot exp(-x**2-y**2) with linespoints if you now 'set pm3d' something really strange happens: the number of pm3d-surface edges in x-direction is n_x, but in y-direction it is n_iso_y. gnuplot> set pm3d gnuplot> replot this gives the strange behaviour in your example. the number of pm3d-surfaces edges should be either n_x,n_y or n_iso_x,n_iso_y but not a mixture of both, i think, but maybe there is a good reason for the status quo? -- View this message in context: http://www.nabble.com/Meaning-of-samples-and-isosamples-with-pm3d-hidden3d--tp15626639p15633723.html Sent from the Gnuplot - Dev mailing list archive at Nabble.com. |