Customizing MATLAB Plots and Subplots
Show older comments
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.
Accepted Answer
More Answers (1)
Bjorn Gustavsson
on 25 Jun 2019
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 Comments
VS
on 25 Jun 2019
dpb
on 25 Jun 2019
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.
Categories
Find more on Annotations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!