help-octave
[Top][All Lists]
Advanced

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

Re: Geometry-drawPolyline3d-object-subplot


From: mmuetzel
Subject: Re: Geometry-drawPolyline3d-object-subplot
Date: Mon, 10 Dec 2018 09:27:32 -0600 (CST)

Vicent wrote
> Hi everybody, I'm doing an animation of some 3dlines using subplots to
> represent the 3 views and a perspective. The thing is that I'm doing it,
> drawing four times the lines, one in each subplot, and it's so
> inefficient.
> I'd like to do it only with one object drawn and the four different points
> of view.
> 
>  I,ve been trying to use the object assignment ( myLine =
> drawPolyline(....)) in order to use this object in each subplot but I
> haven't been able to do it. when the second object is created it is placed
> in the whole window instead of in his subplot space.
> Thanks for your help.
> 
> Example
>  clf;
>  subplot(2,2,1)
>  
> title("FrontView");
> hold on;
> 
> xlabel("X");
> ylabel("Y");
> zlabel("Z");
> axis ([-200 200 -100 200 0 200]); 
> view([0,-1,0]);
> myLine = drawPolyline3d([0,0,0;40,40,40;20,50,20], 'r');
> 
> subplot(2,2,3) 
> 
> title("OverHeadView");
> hold on;
> 
> xlabel("X");
> ylabel("Y");
> zlabel("Z");
> axis ([-200 200 -100 200 0 200]); 
> view(2);
> 
> myLine2 = copyobj(myLine);


Graphics objects can have only one parent in Octave. So you can't use the
very same object in several parents.
But "copyobj" should be working. (I don't know whether that would make any
performance difference though.)
Did you try with specifying the new parent?

[...]
hax2 = subplot (2,2,3);
[...]
myLine2 = copyobj(myLine, hax2);


Markus



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

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