Customizing MATLAB Plots and Subplots
显示 更早的评论
In an economics paper (https://www.federalreserve.gov/econres/feds/files/2018043pap.pdf), all the plots have invisible top axis, with Y-axis values marked on the right hand side with the axis label on top of it, differently from they way MATLAB plots figures in which Y-axis values are marked on the left hand side and axis label is written beside it in a vertical manner.

If you see their figure 9, for instance, which has 4 by 3 subplots, they all share the aforesaid features. More importantly, each individual plot is longer than wider.
THEIR PLOTS

MATLAB PLOTS

I want to generate plots like theirs in MATLAB. I looked around and experimented but couldn't find a solution. Worse, I cannot even figure out which application they have used for all their figures, if it's not MATLAB. Will appreciate any help.
采纳的回答
更多回答(1 个)
Bjorn Gustavsson
2019-6-25
There are contributions on the FEX that facilitate multiple y-axises. This level of figure-tuning often (for me)
turns into a bit of handcraft-work. Something like this might get the axis-locations a few steps toward what you
want:
y = rand(1,7);
[yy1,yy2,yy3] = plotyy(1:7,y,1:7,y);
set(yy3,'color','r')
set(yy1(1),'ycolor','k','yticklabel','','box','off')
set(yy1(2),'ycolor','k')
HTH
2 个评论
VS
2019-6-25
dpb
2019-6-25
See alternate Answer and follow-up comment thereto...
"axes are axes" -- it doesn't make any difference whether they're subplots or not, you treat them the same other than needing to keep the handle to which is which in the array of handles you're (hopefully) saving when you create them.
类别
在 帮助中心 和 File Exchange 中查找有关 Annotations 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
