|
From: Ethan M. <merritt@u.washington.edu> - 2008-03-08 00:37:34
|
On Friday 07 March 2008 03:38, Kai Habel wrote: > Hello, > > I noticed the following problem in octave3.0.0/gnuplot4.2.2 using the wxt terminal. > When I try to plot a 3D mesh with "hidden on" and a rgb color set, only the white > facets without grid are drawn. > > if I use > 'set style line 1 default;' > instead of > 'set style line 1 linewidth 0.500000 pointsize 1.000000 linecolor rgbcolor "#FF00FF";' > and 'set hidden' it works as expected - a grid, with hidden line removal and the > default (green) color is drawn. > > Is this a bug in the script or a gnuplot problem? A bit of both. The issue is that the colors for hidden-surfaces are auto-generated based on the line _type_, but you gave an splot command using a line _style_. Bad luck that it somehow ends up choosing a linetype lt -2 or -3 (background color or no line). This is supposed to be fixable using the command set style increment user (which is a truly horrible name for a command; kudos to anyone who can suggest a better one so that we can deprecate this). This command causes the user-defined line _styles_ to be substituted everywhere a line _type_ would normally be used. So much for the script buglet. Unfortunately, the hidden3d code in 4.2.2 fails to notice when you set this flag, although the CVS version gets it right. The fixed code will be in 4.2.3, which should be out "real soon now". Ethan > > Thanks in advance, > Kai > > --script starts here --- > > set terminal wxt enhanced; > > reset; > set autoscale fix; > set origin 0, 0; > set size 1, 1; > set size noratio; > set grid xtics; > set grid ytics; > set grid ztics; > set grid nomxtics; > set grid nomytics; > set grid nomztics; > set grid layerdefault; > set format x "%g"; > set xtics border textcolor rgb "#000000"; > set format y "%g"; > set ytics border textcolor rgb "#000000"; > set format z "%g"; > set ztics border textcolor rgb "#000000"; > set parametric; > set style data lines; > set surface; > #set style line 1 default; > set style line 1 linewidth 0.500000 pointsize 1.000000 linecolor rgbcolor "#FF00FF"; > set hidden3d; > set xrange [1.0:3.0] noreverse; > set yrange [1.0:3.0] noreverse; > set zrange [0.0:1.0] noreverse; > set border 895; > unset key; > set style data lines; > set ticslevel 0; > set view 60, 322.5; > splot "-" using ($1):($2):($3):($4) title "" with lines linestyle 1 ; > 1 1 1 1 > 1 2 0 0 > 1 3 0 0 > > 2 1 0 0 > 2 2 1 1 > 2 3 0 0 > > 3 1 0 0 > 3 2 0 0 > 3 3 1 1 > > e > > > --- script end --- -- Ethan A Merritt |