octave-maintainers
[Top][All Lists]
Advanced

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

Re: Checking for 2d or 3d plots


From: Shai Ayal
Subject: Re: Checking for 2d or 3d plots
Date: Thu, 5 Aug 2010 16:47:53 +0300

2010/8/5 Jordi Gutiérrez Hermoso <address@hidden>:
> What hopefully simple check can I make in graphics.cc in order to tell
> if the plot is 2d or 3d? The use case is disabling rotation for 2d
> plots.
>
> I asked Shai a while ago, and he said to check the data for a
> z-component, but I haven't been able to figure out what this means.

I'll try to explain:
1. you can check the viewpoint property of the axes. Disadvantage:
even if it is 3-d data, once the viewpoint becomes 2d (i.e. looking
from above the x-y plane), you will not be able to rotate using mouse
2. you can check and see if the actual data lies on a plane (x,y,z
data property of the axes, and also the auto calculated axis limits).
Disadvantage: maybe someone would want to rotate 2d data

Shai



reply via email to

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