Rachel
Rachel

Reputation: 1772

How to rotate a 2D Scatter Plot in Matlab

I have created a 2D scatter plot with the following commands:

h = scatter(handles.axsScatterPlot, sig2, sig1, 'x');
xlabel(['Signal ' num2str(sigNum2) ' Amplitude']);
ylabel(['Signal ' num2str(sigNum1) ' Amplitude']);

I need to rotate the scatter plot by 90 degress clockwise.

Using camroll(90) works, but the axes labels get all messed up.

I have tried using rotate(h, [0 0 1], 90); and rotate(handles.axsScatterPlot, [0 0 1], 90); but neither one seems to have any effect.

Thank you for your help.

Upvotes: 2

Views: 7199

Answers (2)

user5401148
user5401148

Reputation: 1

Use camporbit(theta, phi) instead of camproll(theta)

Upvotes: 0

andyras
andyras

Reputation: 15930

The view or the camva commands can specify your viewing angle.

Upvotes: 2

Related Questions