Doubleaxes XX and YY with tiled layout

1 view (last 30 days)
juan sanchez
juan sanchez on 22 Dec 2021
Commented: Dave B on 22 Dec 2021
How can we do a xx and yy axis on both of these charts. How do we keep control of the positions of the tile in case I want to add xlabes and ylabes. In subplot was fairly simple to do subplot(m,n,position) but here is kind of tricky.
p = uipanel('Position',[.1 .2 .8 .6]);
t = tiledlayout(p,2,1);
% Tile 1
% Tile 2
bar([10 22 31 43 52])
  1 Comment
Dave B
Dave B on 22 Dec 2021
@juan sanchez - can you clarify a little bit what you're trying to accomplish? The first bit seems like you want the effect off yyaxis but for x axes (which isn't something that MATLAB does out of the box but it's possible to fake it), but then the second bit looks like you're just trying to grab a handle to the axes that nexttile makes which is pretty easy (nexttile really does the same as subplot but you don't have to specify the grid size). If you clarify a bit I can give you a good answer either way.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!