Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Thread Subject:
3D plot problem

Subject: 3D plot problem

From: Drago Zarkovic

Date: 5 Jun, 2009 07:48:02

Message: 1 of 5

I made a 3D plot and set cameraposition and target so that only a part of plot is displayed. As soon as I try rotate3d it sets cameraposition so far from a plot that it is shown whole. In earlier versions of Matlab (7.1, 7.0) it was OK, but in 7.7 I have this problem...
plot3([-25 25],[0 0],[0 0],'m')
hold on
plot3([0 0],[-25 25],[0 0],'m')
plot3([0 0],[0 0],[-25 25],'m')
[Xosa,Yosa] = meshgrid(-25:25,-25:25:-25:25);
set(gca,'CameraPosition',[5 5 5],'CameraTarget',[0 0 0],'CameraUpVector',[0 0 1],'CameraViewAngle',45,'Projection','perspective')
I want camera to stay close...

Thank you in advance

Subject: 3D plot problem

From: Drago Zarkovic

Date: 6 Jun, 2009 05:47:01

Message: 2 of 5

When I call camera toolbar and orbit with it it seems to be ok, but rotate3d doesn't work. Is it posible to call camera toolbar comands by code?

Subject: 3D plot problem

From: Drago Zarkovic

Date: 7 Jun, 2009 12:22:01

Message: 3 of 5

I just found out that rotate3d function sets 'CameraPositionMode' to 'Auto' as soon as I rptate plot. Is it posible to override this?

Please someone help

Subject: 3D plot problem

From: Drago Zarkovic

Date: 7 Jun, 2009 19:20:16

Message: 4 of 5

Can someone help please????

Subject: 3D plot problem

From: Sadik

Date: 8 Jun, 2009 03:55:04

Message: 5 of 5

Have you ever used the function view? Maybe that could help. For instance, if you like a view and want to save it, you say:

goodView = view;

Then, when you make another plot and want to use this good view, then you say:


"Drago Zarkovic" <> wrote in message <h0h3tg$qfb$>...
> Can someone help please????

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us