【发布时间】:2018-05-12 05:53:54
【问题描述】:
我想在多个子图的下方或右侧显示一个图例,同时保持子图的纵横比。尝试this answer的方法,我写了如下代码:
x = [0:0.1:10];
figure();
for i=1:4
subplot(3,2,i);
plot(x, x);
endfor;
hSub = subplot(3,2,5:6);
plot(0);
hLegend = legend('1');
set(hLegend, 'position', get(hSub, 'position'));
产生:
图例应该替换完整的情节 5。我在octave documentation 找不到属性position,所以它显然不起作用。
有没有办法改变图例的位置或另一种方法来打印子图旁边的图例?
编辑:
- 八度版本:4.0.3 GUI
- 操作系统:Opensuse 42.2
- graphics_toolkit:用
gnuplot、fltk和qt测试
【问题讨论】: