Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #3665
| From | John Edwards <johned0@gmail.com> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Using arrays |
| Date | 2017-06-03 23:59 +0100 |
| Message-ID | <epgtapF1peqU1@mid.individual.net> (permalink) |
This may be a bit early, since the array functionality was only released
so recently, but I've been trying to use arrays to replicate the
functionality of plotting a multi-column file.
For example, if I have the following data.dat :
-90., -1.30e+01
-60., -3.78e+01
-30., -1.66e+01
0., -5.61e-03
30., -1.66e+01
60., -3.78e+01
90., -1.30e+01
And do plot "data.dat" then I get a graph we're all familiar with.
What I've come up with, to replicate using arrays, is :
array plt[7] = [ {-90., -1.30e+01}, {-60., -3.78e+01}, {-30.,
-1.66e+01}, {0., -5.61e-03}, {30., -1.66e+01}, {60., -3.78e+01}, {90.,
-1.30e+01} ]
plot plt u 1:2
But it doesn't give me what I expected.
I would welcome any thoughts.
Thanks very much,
John
Back to comp.graphics.apps.gnuplot | Previous | Next — Next in thread | Find similar
Using arrays John Edwards <johned0@gmail.com> - 2017-06-03 23:59 +0100
Re: Using arrays Ethan A Merritt <EAMerritt@gmail.com> - 2017-06-03 23:22 -0700
Re: Using arrays John Edwards <johned0@gmail.com> - 2017-06-04 09:30 +0100
Re: Using arrays Ethan A Merritt <sfeam@users.sourceforge.net> - 2017-06-05 09:41 -0700
csiph-web