如何在Matlab上将图例的图例旋转90度?

时间:2019-03-23 15:43:15

标签: matlab rotation matlab-figure legend legend-properties

我正在创建一些图,我需要将图例旋转90度,以避免图例在图形上重叠。

我尝试使用“轮换”适当性,但收到以下消息:

  

“名称'Rotation'不是类'legend'实例的可访问属性。”

下面是我使用的代码段:

x = [-pi:0.001:10.*pi];
y=cos(x);

figure
plot(x,y,'Displayname','y = cos(x)')
lgd = legend('show')

set(lgd,'FontSize',5,'Rotation',90)

0 个答案:

没有答案
相关问题