How can I create a plot with two different yaxis, with one of them inside the figure?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I'd like to produce a plot that has two different yaxis, sharing the same xaxis, but with one of them inside the plot itself. Thus, this script behaviour should be similar to the behaviour of yyaxis left/right, but the right axis should be inside the figure. For clarity's sake, I'd like to have an output similar to this (obtained with Paint):
I tried with subplot, but I was not successful. Do you have any suggestion to obtain such a graph?
0 Commenti
Risposta accettata
Jan
il 20 Mag 2022
Modificato: Jan
il 20 Mag 2022
Simply create 2 axes:
FigH = figure;
Axes1H = axes(FigH, 'Position', [0.1300 0.1100 0.5 0.8150], ...
'Box', 'on');
Axes1H = axes(FigH, 'Position', [0.6300 0.1100 0.2750 0.8150], ...
'Box', 'on');
The axes can overlap also:
FigH = figure;
Axes1H = axes(FigH, 'Position', [0.1300 0.1100 0.7750 0.8150]);
Axes1H = axes(FigH, 'Position', [0.6300 0.1100 0.2750 0.8150]);
Adjust the XTicks accordingly to avoid overlapping labels.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Graphics Object Properties in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!