Matrix plotting, sum/average of a sequence of rows?
718 views
Skip to first unread message
Alex van der Spek
unread,
Aug 20, 2013, 8:43:00 AM8/20/13
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
To plot rows from a matrix:
gnuplot> plot 'foo.txt' matrix using 1:3 every :SKIP::BEG::END with lines
this works well and plots every SKIP rows between BEG and END.
You would think that plotting the sum of those would be
gnuplot> plot 'foo.txt' matrix using (sum [n=BEG:END] column(1)):3 every
:SKIP::BEG::END with lines
this plots the same as the first though. Likewise, if the sum is done on
column 3 this plots the same.
Thoughts?
Alex van der Spek
Alex van der Spek
unread,
Aug 20, 2013, 12:53:10 PM8/20/13
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
The obvious smooth unique did not produce the desired result either
gnuplot> plot 'foo.txt' matrix using 1:3 every :SKIP::BEG::END smooth
unique with lines
I am out of thoughts...anyone?
Thanks in advance,
Alex van der Spek
"Alex van der Spek" <zd...@xs4all.nl> wrote in message
news:5213645a$0$15872$e4fe...@news2.news.xs4all.nl...
sfeam
unread,
Aug 21, 2013, 11:31:28 AM8/21/13
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
This limitation has nothing to do with matrices.
Gnuplot read, processes, and plots one line at a time.
There is no mechanism for summing a column, because that would
require accessing all the lines at once.
Ethan
Alex van der Spek
unread,
Aug 24, 2013, 6:37:34 AM8/24/13
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Thanks Ethan,
I figured something along those lines.
I transposed the matrix outside of gnuplot. Then computing the sum/mean is
easy using the sum function.