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:
Axis Orientation

Subject: Axis Orientation

From: Jane

Date: 4 Mar, 2011 12:08:04

Message: 1 of 5

Hi,

Can I change 3D plots so that the Y axis is up instead of the Z? I can only find reverse direction but I want to change the orientation.

Thanks

Subject: Axis Orientation

From: Jane

Date: 4 Mar, 2011 13:03:20

Message: 2 of 5

"Jane" wrote in message <ikqkn4$avq$1@fred.mathworks.com>...
> Hi,
>
> Can I change 3D plots so that the Y axis is up instead of the Z? I can only find reverse direction but I want to change the orientation.
>
> Thanks

I think I need to use Camera orientation functions but I am not sure how to set it up properly.

Subject: Axis Orientation

From: Bruno Luong

Date: 4 Mar, 2011 13:20:10

Message: 3 of 5

"Jane" wrote in message <ikqnuo$9th$1@fred.mathworks.com>...
> "Jane" wrote in message <ikqkn4$avq$1@fred.mathworks.com>...
> > Hi,
> >
> > Can I change 3D plots so that the Y axis is up instead of the Z? I can only find reverse direction but I want to change the orientation.
> >
> > Thanks
>
> I think I need to use Camera orientation functions but I am not sure how to set it up properly.

What's wrong with setting Matlab z-axis with your y-data?

[X Y]=meshgrid(1:50,1:50);
Z=peaks(50);

surf(Z,X,Y)
xlabel('z');
ylabel('x');
zlabel('y');

% Bruno

Subject: Axis Orientation

From: Jane

Date: 7 Mar, 2011 22:26:21

Message: 4 of 5

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <ikqou9$dsn$1@fred.mathworks.com>...
> "Jane" wrote in message <ikqnuo$9th$1@fred.mathworks.com>...
> > "Jane" wrote in message <ikqkn4$avq$1@fred.mathworks.com>...
> > > Hi,
> > >
> > > Can I change 3D plots so that the Y axis is up instead of the Z? I can only find reverse direction but I want to change the orientation.
> > >
> > > Thanks
> >
> > I think I need to use Camera orientation functions but I am not sure how to set it up properly.
>
> What's wrong with setting Matlab z-axis with your y-data?
>
> [X Y]=meshgrid(1:50,1:50);
> Z=peaks(50);
>
> surf(Z,X,Y)
> xlabel('z');
> ylabel('x');
> zlabel('y');
>
> % Bruno

Hi,

When I replace the y with the z matlab plots the data as if it was sideways instead of facing upwards because i think the orginal orientation is y upwards and not z. hope this makes sense.

Subject: Axis Orientation

From: Bruno Luong

Date: 8 Mar, 2011 07:56:04

Message: 5 of 5

"Jane" wrote in message <il3m2d$dpf$1@fred.mathworks.com>...

>
> When I replace the y with the z matlab plots the data as if it was sideways instead of facing upwards because i think the orginal orientation is y upwards and not z. hope this makes sense.

No it does not, and it's confuse.

Bruno

Tags for this Thread

No tags are associated with 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