help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: plot a vector in a matrix


From: PhilipNienhuis
Subject: Re: plot a vector in a matrix
Date: Fri, 22 Jun 2018 13:22:14 -0700 (MST)

Przemek Klosowski-7 wrote
> 
> <snip>
> This reminds me to ask here for tips and tricks. Often, I have an x-y 
> data file:
> 
> 1 2
> 2 2.1
> 3 2.4
> 4 3.1
> 5 2.2
> 6 2.3
> 
> so I read it as
> 
> a=load('mydata')
> 
> and then plot with this idiom:
> 
> plot(a(:,1),a(:,2))
> 
> Is there a shortcut for a simple plot like that? The two-column data set 
> is such a common use case that it would be nice if plot(a) did the same 
> thing as the line above, or if there was a way to load the data into 
> separate x and y vectors and plot them with plot(x,y). What's your
> shortcut?

In bug #47149 Lachlan A supplied a patch that goes some way. I had it
applied in my own builds for some time but it screwed up some tests in the
test suite.
Maybe you can find out why?

Philip



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]