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

3 visualizaciones (últimos 30 días)
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.

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 27 de Jun. de 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.

Más respuestas (0)

Categorías

Más información sobre Data Exploration en Help Center y File Exchange.

Productos


Versión

R14SP1

Community Treasure Hunt

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

Start Hunting!

Translated by