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!
