# Rotate a horizontal matlab legend so that it is parallel to the y-axis

43 views (last 30 days)
MOOSE on 30 May 2020
Commented: Walter Roberson on 30 May 2020
Hi,
I have a plot containing 4 lines, with a corresponding legend of the form:
lgd=legend({'$J_0/\mu = 0$','$J_0/\mu = 0.3$','$J_0/\mu = 0.6$'...
,'$J_0/\mu = 0.8$','$J_0/\mu = 0.9$'},'Interpreter','latex','Position',[0.5 0.05 0.1 0.1],'Orientation','horizontal')
Note that the orientation is horisontal.
I want to rotate this legend by 90 degrees, so that I can place it parallel to the y-axis. Is there an easy way to do this?

#### 1 Comment

Walter Roberson on 30 May 2020
I would not say it is impossible, but there is certainly no easy way to do it.