[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Plotting Multiple Disconnected Lines in one call of line function
From: |
Michael Goffioul |
Subject: |
Re: Plotting Multiple Disconnected Lines in one call of line function |
Date: |
Sat, 31 Dec 2011 19:31:46 +0100 |
To insert "holes" in a line object, use NaN in the coordinates. So for
instance, the following should only print 2 line segments, but the 2
segments are part of a single line object (hence controlled by the
same properties):
x = [1 2 NaN 3 4]
y = [1 2 NaN 3 4]
plot (x, y)
Michael.
On Sat, Dec 31, 2011 at 2:16 PM, onur güngör <address@hidden> wrote:
> Hi,
>
> I'm trying to run code
>
> line([34 34 40 40], [0 35 0 35], 'color', 'y')
>
> to produce two vertical lines on 34 and 40 in x-axis. I suspect this is
> working in Matlab because this code is borrowed from a colleague who
> uses Matlab. Sorry, I don't have Matlab to check it.
>
> Actually, the function does what it is supposed to do, it connects each
> pair. But how can I make it connects only in triples?
>
> line([34 34], [0 35], 'color', 'y') also works as expected.
>
> Thanks,
> Onur
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave