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)
Show older comments
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
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.
0 Comments
More Answers (0)
See Also
Categories
Find more on Data Exploration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!