octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #47149] line ([x1, x2]', [y1, y2]) works in Ma


From: Lachlan Andrew
Subject: [Octave-bug-tracker] [bug #47149] line ([x1, x2]', [y1, y2]) works in Matlab but not Octave
Date: Fri, 19 Feb 2016 00:22:59 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0

Follow-up Comment #6, bug #47149 (project octave):

Good point, jwe.  I was totally forgetting that it is possible to access the
data again.

The reason I wasn't getting any line was that I was drawing vertical lines,


  line ([x1, x1]', [y1, y2])


and so each line was reduced to a single point.

Fortunately, Matlab gives


>> h = line ([1,2]', [3,4])
h =
  173.0011
>> get (h, {'xdata', 'ydata'})
ans = 
    [1x2 double]    [1x2 double]


so it seems we can just transpose the data -- much better than having to
modify some subset of graphics toolkits to reinterpret the data.

Similar to your last example, Octave gives a diagonal line for the one-shot
command


 line ('xdata', [1, 2]', 'ydata', [3, 4]);


Thanks for all your guidance.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?47149>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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