the special filename "++" produces x,y-pairs, nothing more
(gnuplot manual, chapter 65.2.14):
to use these data for vectors you need to re-use the x- and y-data for the
direction data which is needed for a vector (x,y,xdelta,ydelta; see
gnuplot manual, chapter 44), here (x,y,xdelta=x,ydelta=2y):
plot ... using 1:2:1:(2.*$2) with vectors
to scale the vector length, scale xdelta and ydelta:
plot ... using
'set table' gives plot coordinates, but not input data.
> Much appreciated, Thomas. Quite nice.
> So, one big problem I had with the gnuplot.pdf manual is that it gave no
> satisfactory explanation for how the "using" command works. As far as I
> could work out, "using 1:2:4" indicates using the first, second and fourth
> columns of data in a data file, but since no actual data file is ever
> shown and examples are sparse, I can not even remotely envision how things
> "connect" contextually. So, to fully understand your code, I have to know
> what at least one line of the "++" data file looks like. Putting "set
> table" into your code lets me see it, and I can see that the first line is
> -5 5 -5 10 i
> (Just an aside, but I find it odd that y starts at 5 instead of -5).
> Okay, so one more question, and then I'll go get the book "GNUplot in
> Action" and maybe become less of a pest: What about a direction field?
> That is, how can we make all the arrows in the vector field have the same
> length of, say, 0.5? It looks like the file "++" would need a fifth
> and a sixth column
> (hope I have the syntax right) and then somehow get a plot of "++" using
> 1:2:5:6 with vectors. Am I close? (I'll be teaching a differential
> equations class in the spring.)
> Thomas Sefzick wrote:
>> set xrange [-5:5]
>> set yrange [-5:5]
>> # only integer x-cordinates
>> set samples 11
>> # only integer y-cordinates
>> set isosamples 11
>> # we need data, so we use the special filename "++", which
>> # produces x,y-pairs
>> plot "++" using 1:2:1:(2.*$2) with vectors
View this message in context: http://old.nabble.com/Vector-Fields-tp32953675p32958791.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.