Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #1987

Re: Matrix plotting, sum/average of a sequence of rows?

From sfeam <sfeam@users.sourceforge.net>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: Matrix plotting, sum/average of a sequence of rows?
Followup-To comp.graphics.apps.gnuplot
Date 2013-08-21 08:31 -0700
Organization gnuplot development team
Message-ID <kv2mgi$bla$1@dont-email.me> (permalink)
References <5213645a$0$15872$e4fe514c@news2.news.xs4all.nl>

Followups directed to: comp.graphics.apps.gnuplot

Show all headers | View raw


Alex van der Spek wrote:

> 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

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



Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Matrix plotting, sum/average of a sequence of rows? "Alex van der Spek" <zdoor@xs4all.nl> - 2013-08-20 14:43 +0200
  Re: Matrix plotting, sum/average of a sequence of rows? "Alex van der Spek" <zdoor@xs4all.nl> - 2013-08-20 18:53 +0200
  Re: Matrix plotting, sum/average of a sequence of rows? sfeam <sfeam@users.sourceforge.net> - 2013-08-21 08:31 -0700
    Re: Matrix plotting, sum/average of a sequence of rows? "Alex van der Spek" <zdoor@xs4all.nl> - 2013-08-24 12:37 +0200

csiph-web