MATLAB Answers

peyush
0

How to rotate plot using code?

Asked by peyush
on 5 Jul 2015
Latest activity Commented on by peyush
on 5 Jul 2015
I have a plot showing pixel intensity values. I want to rotate the plot clockwise 90 degrees...can anyone help

  0 Comments

Sign in to comment.

2 Answers

Answer by arun
on 5 Jul 2015
Edited by arun
on 5 Jul 2015
 Accepted Answer

let y is pixel intensity
x=1:1:length(y)
plot(y,x) may work instead of plot(y)
this command is useful to flip axis
set(gca,'YDir','reverse');
u can use this command too
camroll(-90)

  1 Comment

peyush
on 5 Jul 2015
thanks

Sign in to comment.


Jan
Answer by Jan
on 5 Jul 2015

Arun's "camroll" approach is equivalent to setting the CameraUpVector.

  1 Comment

peyush
on 5 Jul 2015
thanks

Sign in to comment.