Got Questions? Get Answers.
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

Thread Subject:
rotate 3d plot basic question

Subject: rotate 3d plot basic question

From: leo nidas

Date: 15 Feb, 2012 00:01:11

Message: 1 of 2


Hi there,

I plot a surface

h3=surf(p1,p3,z)

then I would like to rotate it around the z axis the same way I would by using the rotation in the GUI using my mouse.

When I use

rotate(h3,[0 0 1],90)

even though the graph is as expected to be, the axes are wrong. Is there a way to program it to rotate and preserve the axes. I want to do exactly what I would do with my mouse, but using exactly 90 degrees.

I have multiple plots and I would like to use something like the rotate function.

I don't know if I am clear.. The h3 graph is exactly what I want. I simply want to view the whole graph from another angle so as to be prettier and understand it better.

Subject: rotate 3d plot basic question

From: Sami

Date: 26 Nov, 2012 03:12:15

Message: 2 of 2

hello Leo.

You can use the command view(x,y) to rotate the graph around.

Sami


"leo nidas" <bleonidas25@yahoo.gr> wrote in message <jhesk7$std$1@newscl01ah.mathworks.com>...
>
> Hi there,
>
> I plot a surface
>
> h3=surf(p1,p3,z)
>
> then I would like to rotate it around the z axis the same way I would by using the rotation in the GUI using my mouse.
>
> When I use
>
> rotate(h3,[0 0 1],90)
>
> even though the graph is as expected to be, the axes are wrong. Is there a way to program it to rotate and preserve the axes. I want to do exactly what I would do with my mouse, but using exactly 90 degrees.
>
> I have multiple plots and I would like to use something like the rotate function.
>
> I don't know if I am clear.. The h3 graph is exactly what I want. I simply want to view the whole graph from another angle so as to be prettier and understand it better.

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