|
From: Manfred S. <man...@gm...> - 2008-10-15 15:07:13
|
Hi,
I'm experimenting with the new polygon object and encountered two stumbling blocks.
1) I'm doing something like
set object 1 polygon \
from screen 0.820186699373,0.915943621944 \
to screen 0.816522727098,0.922822961096 \
to screen 0.824158694467,0.917927083652 \
to screen 0.820186699373,0.915943621944 front fc ls 3 fs solid 1.0
and I get "Polygon is not closed - adding extra vertex", although my polygon is
perfectly closed?
2) clipping:
At the plot borders, these objects seem to be clipped (cut off). As I use these objects as
somehow generic drawing objects in a mixture with "set arrow", things become
really messy, as arrows are not clipped.
What I would need are objects that are not clipped, so I can use the whole screen.
Up to now I found no way to deactivate this clipping feature. Is there a way to do so?
Thanks,
Manfred
--
GMX Kostenlose Spiele: Einfach online spielen und Spaß haben mit Pastry Passion!
http://games.entertainment.gmx.net/de/entertainment/games/free/puzzle/6169196
|
|
From: Ethan M. <merritt@u.washington.edu> - 2008-10-15 19:28:01
|
On Wednesday 15 October 2008 08:05:26 Manfred Schwarb wrote: > Hi, > > I'm experimenting with the new polygon object and encountered two stumbling blocks. > > 1) I'm doing something like > set object 1 polygon \ > from screen 0.820186699373,0.915943621944 \ > to screen 0.816522727098,0.922822961096 \ > to screen 0.824158694467,0.917927083652 \ > to screen 0.820186699373,0.915943621944 front fc ls 3 fs solid 1.0 > > and I get "Polygon is not closed - adding extra vertex", although my polygon is > perfectly closed? For what it's worth, I don't get that warning message when I cut-and-paste your above commands. Maybe it's due to rounding error when storing floating point numbers? But that warning should not harm anything. > 2) clipping: > At the plot borders, these objects seem to be clipped (cut off). As I use these objects as > somehow generic drawing objects in a mixture with "set arrow", things become > really messy, as arrows are not clipped. > What I would need are objects that are not clipped, so I can use the whole screen. > Up to now I found no way to deactivate this clipping feature. Is there a way to do so? Heh. You have no idea how much time I spent to get that clipping to work. But yes, I can imagine there are cases when clipping is undesirable. The question is: is that a property of the object or a property of the whole plot? I'll have to think about it. Which would be more obvious in your case? set clip <something> plot 'foo' or set object 1 polygon noclip .... plot 'foo' -- Ethan A Merritt |
|
From: Manfred S. <man...@gm...> - 2008-10-15 21:03:16
|
Am Mittwoch, den 15.10.2008, 12:27 -0700 schrieb Ethan Merritt: > On Wednesday 15 October 2008 08:05:26 Manfred Schwarb wrote: > > Hi, > > > > I'm experimenting with the new polygon object and encountered two stumbling blocks. > > > > 1) I'm doing something like > > set object 1 polygon \ > > from screen 0.820186699373,0.915943621944 \ > > to screen 0.816522727098,0.922822961096 \ > > to screen 0.824158694467,0.917927083652 \ > > to screen 0.820186699373,0.915943621944 front fc ls 3 fs solid 1.0 > > > > and I get "Polygon is not closed - adding extra vertex", although my polygon is > > perfectly closed? > > For what it's worth, I don't get that warning message when I cut-and-paste your > above commands. Maybe it's due to rounding error when storing floating point numbers? > But that warning should not harm anything. > I didn't try it separately, but in a gnuplot script sketched as follows set term png truecolor set multiplot set pm3d interpolate 40,40 explicit map set object 1 polygon ... splot ... with pm3d ... I got these warnings. It's on a x86_64 box, this may be the difference (I vaguely remember there is some excess precision on x68_32 [-mfpmath=387] or so). For me it was just irritating, I checked the numbers at least twice and could not find a typo .. But in any case, I think for set object 1 polygon from x1,y1 to x2,y2 i.e. drawing a simple line, this message should be suppressed. > > 2) clipping: > > At the plot borders, these objects seem to be clipped (cut off). As I use these objects as > > somehow generic drawing objects in a mixture with "set arrow", things become > > really messy, as arrows are not clipped. > > What I would need are objects that are not clipped, so I can use the whole screen. > > Up to now I found no way to deactivate this clipping feature. Is there a way to do so? > > Heh. You have no idea how much time I spent to get that clipping to work. > Hmm :-) I guess doing this clipping is a reasonable default and what most people probably expect. > But yes, I can imagine there are cases when clipping is undesirable. > The question is: is that a property of the object or a property of the whole plot? > I'll have to think about it. > > Which would be more obvious in your case? > set clip <something> > plot 'foo' > or > set object 1 polygon noclip .... > plot 'foo' > The meaning of "set clip" is already complicated enough, IMHO. So I would be in favor of the noclip argument to "set object". But either thing would be great. Thanks! Manfred |
|
From: Ethan M. <merritt@u.washington.edu> - 2008-10-16 21:12:14
|
On Wednesday 15 October 2008 14:03:07 Manfred Schwarb wrote: > > > 2) clipping: > > > At the plot borders, these objects seem to be clipped (cut off). As I use these objects as > > > somehow generic drawing objects in a mixture with "set arrow", things become > > > really messy, as arrows are not clipped. > > > What I would need are objects that are not clipped, so I can use the whole screen. > > > Up to now I found no way to deactivate this clipping feature. Is there a way to do so? > > > > Heh. You have no idea how much time I spent to get that clipping to work. > > > > Hmm :-) I guess doing this clipping is a reasonable default and what > most people probably expect. > > > But yes, I can imagine there are cases when clipping is undesirable. > > The question is: is that a property of the object or a property of the whole plot? > > I'll have to think about it. I have modified the code in CVS so that if all the polygon vertices are given in screen coordinates, then it is clipped against the full canvas rather than against the plot borders. -- Ethan A Merritt |
|
From: Manfred S. <man...@gm...> - 2008-10-17 22:09:05
|
Am Donnerstag, den 16.10.2008, 14:12 -0700 schrieb Ethan Merritt: > On Wednesday 15 October 2008 14:03:07 Manfred Schwarb wrote: > > > > 2) clipping: > > > > At the plot borders, these objects seem to be clipped (cut off). As I use these objects as > > > > somehow generic drawing objects in a mixture with "set arrow", things become > > > > really messy, as arrows are not clipped. > > > > What I would need are objects that are not clipped, so I can use the whole screen. > > > > Up to now I found no way to deactivate this clipping feature. Is there a way to do so? > > > > > > Heh. You have no idea how much time I spent to get that clipping to work. > > > > > > > Hmm :-) I guess doing this clipping is a reasonable default and what > > most people probably expect. > > > > > But yes, I can imagine there are cases when clipping is undesirable. > > > The question is: is that a property of the object or a property of the whole plot? > > > I'll have to think about it. > > I have modified the code in CVS so that if all the polygon vertices are > given in screen coordinates, then it is clipped against the full canvas > rather than against the plot borders. > Thanks a lot, yes this will work for me. But this is probably quite confusing, if "set object rect" has other clipping properties than "set object polygon". A possibility would be, of course, to add this scheme to the whole "set object" class ... Cheers, Manfred |
|
From: Ethan M. <merritt@u.washington.edu> - 2008-10-17 23:13:54
|
On Friday 17 October 2008 15:08:58 Manfred Schwarb wrote:
> >
> > I have modified the code in CVS so that if all the polygon vertices are
> > given in screen coordinates, then it is clipped against the full canvas
> > rather than against the plot borders.
> >
>
> Thanks a lot, yes this will work for me.
> But this is probably quite confusing, if "set object rect" has other
> clipping properties than "set object polygon".
Hmmm. True, they are not quite identical.
rectangles: clipped to the canvas if none of the vertices are
given in axis coordinates.
polygons: clipped to the canvas if all of the vertices are
given in screen coordinates.
circles: clipped to the plot for "plot with circles"
clipping not reliable for "set object circle"
The only conflicting case is where an edge has one end specified in
axis coordinates and the other end specified in screen coordinates.
That seems like an unusual thing to do, at best.
If this causes a problem, we will deal with it. Right now I don't know
whether the rectangle or the polygon scheme is better in practice.
It would be nice to have better clipping for circles; perhaps the new
polygon clipping algorithm can be used there also.
--
Ethan A Merritt
|