help-octave
[Top][All Lists]
Advanced

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

Two questions about plotting with Octave


From: Zumsel
Subject: Two questions about plotting with Octave
Date: Mon, 2 Apr 2012 06:00:37 -0700 (PDT)

I'm still a newbie with octave, so may questions may be pretty basic:

1. Say I have to matrices data1 and data1, with two columns and n and m rows
respectively. Assume n < m. The first column is a time-coordinate, so
data2(1:n,1) is identical to data1(:,1). With

plot( data1(:,1) , [data1(:,2) ; data2(1:n,2) ])

I can plot the first column of data1 versus the second column of data1 and
the first n entries of the second column of data2. However I can't plot 

plot( data2(:,1) , [data1(:,2) ; data2(:,2) ])

because data1(:,2) is too short. Is it somehow possible to have data1(:,2)
and data2(:,2) in the same plot, even though the first one is shorter?

2. With

loglog( data1(:,1) , data1(:,2) )

both axes are logarithmic. Is it possible to have only the second axis
logarithmic? Of course 

plot( data1(:,1) , log(data1(:,2)) )

would give the correct plot, though with incorrect labeling of the second
axis.

--
View this message in context: 
http://octave.1599824.n4.nabble.com/Two-questions-about-plotting-with-Octave-tp4525935p4525935.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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