help-octave
[Top][All Lists]
Advanced

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

Re: Different plot behavior in octave and gnuplot


From: Francesco Potortì
Subject: Re: Different plot behavior in octave and gnuplot
Date: Wed, 12 Sep 2012 22:00:02 +0200

>Starting with the simplest plots given in the manual itself, I get expected
>output for hist(y), bar(y), and stairs(y), but plot(y) does not produce a
>horizontal line at y. I'm quite sure that plot(5), for example, should
>produce a horizontal line at y = 5, without additional syntax.   

I don't hink so.  For a quick example, try
 plot(1:2)

>when I set y = 5, and then try plot (y), I get a blank figure.  My question
>is, why doesn't this plot?

Because a plot is made of segments between points.  But if you have a
single point you cannot draw a line.  To get a horizontal line at y=5 do
 plot([5,5])

-- 
Francesco Potortì (ricercatore)        Voice:  +39.050.315.3058 (op.2111)
ISTI - Area della ricerca CNR          Mobile: +39.348.8283.107
via G. Moruzzi 1, I-56124 Pisa         Fax:    +39.050.315.2040  
(entrance 20, 1st floor, room C71)     Web:    http://fly.isti.cnr.it


reply via email to

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