Filter löschen
Filter löschen

Doubleaxes XX and YY with tiled layout

4 Ansichten (letzte 30 Tage)
juan sanchez
juan sanchez am 22 Dez. 2021
Kommentiert: Dave B am 22 Dez. 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
nexttile(t)
stem(1:13)
% Tile 2
nexttile(t)
bar([10 22 31 43 52])
  1 Kommentar
Dave B
Dave B am 22 Dez. 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.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by