How can I use the Zooming and Panning tools on a 2-D plot derived from a 3-D plot?

3 views (last 30 days)
I have a set of 3D data that I visualize using PLOT3. I then change the view of the axes, to see a particular plane (in this case, the YZ plane) as follows:
x=1:10;
y=1:10;
z=x.^2;
plot3(x,y,z)
xlabel('x')
ylabel('y')
zlabel('z')
view(90,0);
When I use the Zooming or Panning tools, they behave like the axes view is 3D, instead of 2D.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
The ability to use 2D plot functionalities like Zooming and Panning on 3D plots is not currently available in MATLAB.
To work around this issue, create a new 2-D plot with just the Y and Z data rather than choosing a 2D view of the original 3D plot. So for the above example, we would have
x=1:10;
y=1:10;
z=x.^2
plot3(x,y,z)
xlabel('x')
ylabel('y')
zlabel('z')
view(90,0);
figure
plot(y,z);
xlabel('y');
zlabel('z');
You can now use the Zooming and Panning tools on this plot.

More Answers (0)

Categories

Find more on Data Exploration in Help Center and File Exchange

Products


Release

R14SP1

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!