Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Daniel J Sebald <daniel.sebald@ie...>  20070314 20:14:41

Here are a few other things that might be nice to have: * Many times people want to plot a line representing some boundary or plane which basically means they'd like to have the line extend from one boundary of the plot to another. In other words, they'd like an infinite length line that should be clipped at the boundary. (Or a line that is infinite in one direction and not the other... a bit imprecised, math wise, but I think you get the idea.) To do this now, I believe the user has to resort to computing the points of intersection of the line and the four possible boundaries. (If they have a bit more knowledge about the slope of the line, guessing which boundaries intersect is easy.) This isn't a difficult problem for the user, but it is a bit of a pain. So, if the term>clip_region() function is implemented, it might be nice to have gnuplot do this work for the user. So, for arrow, rather than just a "to"/"from", it might be nice to augment that with "thru"/"slope", or more generally w'x + b where w is a two dimensional or three dimensional vector perpendicular to the line or plane and b is a constant (commonly referred to as a hyperplane). I'm not exactly sure what syntax one would use: set arrow from 0,0 to border thru 1,1 set arrow from border to border thru 0,0 perp (1,1) Requires some thought, but the idea of saving the user a bit of work seems worthwhile. * How about a line format that puts a periodic arrowhead along its path? Sort of this kind of thing: >>>>>>>>>> ? This sort of line is often useful for indicating flow or direction of travel. Dan 
From: Ethan Merritt <merritt@u.washington.edu>  20070314 20:57:41

On Wednesday 14 March 2007 14:15, Daniel J Sebald wrote: >=20 > * Many times people want to plot a line representing some boundary or pla= ne which basically means they'd like to have the line extend from one bound= ary of the plot to another. In other words, they'd like an infinite length= line that should be clipped at the boundary. (Or a line that is infinite = in one direction and not the other... a bit imprecised, math wise, but I th= ink you get the idea.) To do this now, I believe the user has to resort to= computing the points of intersection of the line and the four possible bou= ndaries. (If they have a bit more knowledge about the slope of the line, g= uessing which boundaries intersect is easy.) This isn't a difficult proble= m for the user, but it is a bit of a pain. So, if the term>clip_region() = function is implemented, it might be nice to have gnuplot do this work for = the user. So, for arrow, rather than just a "to"/"from", it might be nice = to augment that with "thru"/"slope", or more generally w'x + b where w is a= two dimensional=20 > or three dimensional vector perpendicular to the line or plane and b is a= constant (commonly referred to as a hyperplane). I'm not exactly sure wha= t syntax one would use: Maybe I haven't had enough coffee yet, but I have no idea what you are trying to describe here. How is this different from just specifying the equation of a line, and letting gnuplot clip it at the plot boundaries? =2D=20 Ethan A Merritt 
From: Daniel J Sebald <daniel.sebald@ie...>  20070314 22:04:36

Ethan Merritt wrote: > On Wednesday 14 March 2007 14:15, Daniel J Sebald wrote: > >>* Many times people want to plot a line representing some boundary or plane which basically means they'd like to have the line extend from one boundary of the plot to another. In other words, they'd like an infinite length line that should be clipped at the boundary. (Or a line that is infinite in one direction and not the other... a bit imprecised, math wise, but I think you get the idea.) To do this now, I believe the user has to resort to computing the points of intersection of the line and the four possible boundaries. (If they have a bit more knowledge about the slope of the line, guessing which boundaries intersect is easy.) This isn't a difficult problem for the user, but it is a bit of a pain. So, if the term>clip_region() function is implemented, it might be nice to have gnuplot do this work for the user. So, for arrow, rather than just a "to"/"from", it might be nice to augment that with "thru"/"slope", or more generally w'x + b where w is a two dimensiona l >>or three dimensional vector perpendicular to the line or plane and b is a constant (commonly referred to as a hyperplane). I'm not exactly sure what syntax one would use: > > > Maybe I haven't had enough coffee yet, but I have no idea > what you are trying to describe here. > How is this different from just specifying the equation of a line, Well, that is a good point. Giving the equation of a line just about does it. Maybe this isn't as difficult as I thought. Let me illustrate. Consider drawing some asymptotes at (2,0) (I'll leave out the actual curves.) I want something like set arrow 1 from 2,0 to 10,0 nohead lc rgb "black" set arrow 2 from 2,0 to 2+10*cos(pi/3),0+10*sin(pi/3) nohead lc rgb "black" set arrow 3 from 2,0 to 2+10*cos(pi/3),0+10*sin(pi/3) nohead lc rgb "black" set xrange [5:5] set yrange [5:5] plot '' with points 0 0 e OK, some comments: 1) I'd like the asymptotes to be dashed lines. Is it possible to do so, I mean generally speaking for all terminals? 2) Note how the lines are not clipped at the boundaries. Let's say that clipping region is possible and I change from set xrange [5:5] to set xrange [20:20] I'd have to go back and make sure my lines extend past the boundaries. Anyway... 3) OK, not too much work to compute those additional requirements by noting the boundary is y=+5 and figure 0+Y*sin(pi/3) = +5 or set arrow 1 from 2,0 to 5,0 nohead lc rgb "black" set arrow 2 from 2,0 to 2+5/sin(pi/3),0+5 nohead lc rgb "black" set arrow 3 from 2,0 to 2+5/sin(pi/3),05 nohead lc rgb "black" set xrange [5:5] set yrange [5:5] plot '' with points 0 0 e But let's say I change my range now from set xrange [5:5] to set xrange [5:1] in which case I'd have to focus now on the intersection along the right boundary rather than the top and bottom. 4) As Ethan mentioned, do this with lines so that clipping behaves as desired. But I then have to set up the sampling so that a sample point lands on (2,0), and do this as parametric so that I can get portions of lines. Ultimately, I think it isn't convenient for the user to enter lines like I have. (And what I've done doesn't seem too unusual of a request.) Dan 
From: Daniel J Sebald <daniel.sebald@ie...>  20070314 22:33:11

Daniel J Sebald wrote: [snip] Ultimately, maybe the easiest is: set term x11 dashed set xrange [5:5] set yrange [5:5] plot '' title '' with lines lt 1 lc rgb "black", \ '' title '' with lines lt 1 lc rgb "black", \ '' title '' with lines lt 1 lc rgb "black", \ '' with points 2 0 488 866.03 e 2 0 488 866.03 e 2 0 1002 0 e 0 0 e I.e., just make sure one has chosen the line end points outside the boundaries in question. Dan 
From: <HBB<roeker@t...>  20070314 21:13:27

Daniel J Sebald wrote: > * Many times people want to plot a line representing some boundary or > plane which basically means they'd like to have the line extend from > one boundary of the plot to another. set arrow from graph 0, first <y1> to graph 1, first <y2> nohead does that quite nicely. > now, I believe the user has to resort to computing the points of > intersection of the line and the four possible boundaries. Not at all. Express the line as a function and plot it. Done. > So, if the term>clip_region() > function is implemented, it might be nice to have gnuplot do this > work for the user. Not unless you also want to add a term>draw_infinite_line() entry to it while at it. term>clip_region is for clipping primitives. Infinite lines aren't terminal primitives, and as long as they aren't, it's none of term>clip_region()'s job to clip them. 
From: Ethan Merritt <merritt@u.washington.edu>  20070314 22:27:06

On Wednesday 14 March 2007 16:05, Daniel J Sebald wrote: > > set arrow 1 from 2,0 to 10,0 nohead lc rgb "black" > set arrow 2 from 2,0 to 2+10*cos(pi/3),0+10*sin(pi/3) nohead lc rgb "black" > set arrow 3 from 2,0 to 2+10*cos(pi/3),0+10*sin(pi/3) nohead lc rgb "black" > > 1) I'd like the asymptotes to be dashed lines. Is it possible to do so, > I mean generally speaking for all terminals? No. Not all terminals can draw dotted lines. Them's the breaks. > 2) Note how the lines are not clipped at the boundaries. Correct. Only the plots themselves are clipped to the plot boundaries. That is a feature. Otherwise you obviously couldn't place arrows and labels in the borders. > 4) As Ethan mentioned, do this with lines so that clipping behaves as desired. > But I then have to set up the sampling so that a sample point lands on (2,0), > and do this as parametric so that I can get portions of lines. ??? No idea what you are talking about with points, sampling, parametric. All garbage. If you want a line through (2,0) with a defined slope S line1(x) = S*(x+2) plot line1(x) If you want only a portion of that line, you set bounds: line1(x) = x < lower ? NaN : x > upper ? NaN : S*(x+2) But if that's what you want then you could have used arrows as you originally showed. And you don't need clipping if you're setting the bounds yourself.  Ethan A Merritt Courier Deliveries: 1959 NE Pacific Dept of Biochemistry Health Sciences Building University of Washington  Seattle WA 981957742 
From: Daniel J Sebald <daniel.sebald@ie...>  20070314 22:38:42

Ethan Merritt wrote: > On Wednesday 14 March 2007 16:05, Daniel J Sebald wrote: > >>set arrow 1 from 2,0 to 10,0 nohead lc rgb "black" >>set arrow 2 from 2,0 to 2+10*cos(pi/3),0+10*sin(pi/3) nohead lc rgb "black" >>set arrow 3 from 2,0 to 2+10*cos(pi/3),0+10*sin(pi/3) nohead lc rgb "black" >> >>1) I'd like the asymptotes to be dashed lines. Is it possible to do so, >>I mean generally speaking for all terminals? > > > No. Not all terminals can draw dotted lines. Them's the breaks. > > >>2) Note how the lines are not clipped at the boundaries. > > > Correct. Only the plots themselves are clipped to the plot boundaries. > That is a feature. > Otherwise you obviously couldn't place arrows and labels in the borders. Yes, I thought of that after I sent the original message. But still, if one of the end points of the arrow is "plotboundary" or something then the arrow should no to clip there. >>4) As Ethan mentioned, do this with lines so that clipping behaves as desired. >>But I then have to set up the sampling so that a sample point lands on (2,0), >>and do this as parametric so that I can get portions of lines. > > > ??? > No idea what you are talking about with points, sampling, parametric. > All garbage. If you want a line through (2,0) with a defined slope S > > line1(x) = S*(x+2) > plot line1(x) > > If you want only a portion of that line, you set bounds: > line1(x) = x < lower ? NaN : x > upper ? NaN : S*(x+2) Right, that is what I meant. But recall that gnuplot does an internal sampling when plotting so that you aren't sure that the point will start at (2,0). There could be a little bit of discrepancy that makes the lines not exactly right. Dan 
Sign up for the SourceForge newsletter:
No, thanks