help-octave
[Top][All Lists]
Advanced

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

Re: Plotting Multiple Disconnected Lines in one call of line function


From: onur güngör
Subject: Re: Plotting Multiple Disconnected Lines in one call of line function
Date: Mon, 02 Jan 2012 13:57:49 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111124 Thunderbird/8.0

On 12/31/2011 09:31 PM, Jordi Gutiérrez Hermoso wrote:
> On 31 December 2011 13:31, Michael Goffioul <address@hidden> wrote:
>> To insert "holes" in a line object, use NaN in the coordinates.
> You can also plot a matrix against a vector:
>
>     x = rand(10,1); plot([x,x], [0, 1])
>
> - Jordi G. H.

Thanks for all the answers, they are working correctly, as expected.

Especially, the best is to use

x = [34 40]';
plot([x,x], [0, 35]);

But the problem I had was the following. I am sorry that I was careless
for not sharing this error message.

octave:42> figure(4)
octave:43> line([34 34; 40 40], [0 35; 0 35], 'color', 'r')
error: invalid value for array property "xdata"
error: set: expecting argument 2 to be a property name
error: set: expecting argument 4 to be a property name
error: called from:
error:   /usr/share/octave/3.2.4/m/plot/__line__.m at line 65, column 5
error:   /usr/share/octave/3.2.4/m/plot/line.m at line 38, column 5

Thanks again,
Onur




reply via email to

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