duplicate y-axis for a nested boxplot
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello,
I have a boxplot that is drawn inside another one. I need to display the y-tick for the right y-axis of the inner boxplot. I get confused when playing with axes.
This is what I have so far with no luck
boxplot(all,g,'symbol','ko','width',0.5);
Axes2H = axes('Units', 'normalized', 'Position', [0.18, 0.4, 0.15, 0.45]);
t=[repmat({'1'}, 1634, 1); repmat({'2'}, 2328, 1)];
boxplot([KS1;KS2],t,'width',0.5); set(Axes2H, 'YScale','log');
ax1 = Axes2H;
ax2 = axes('Position', get(ax1, 'Position'), ...
'Color', 'none', 'YAxisLocation', 'right', ...
'XTick', [], 'YTick', get(ax1, 'YTick'), ...
'YLim', ylim(ax1), 'HandleVisibility', 'off');
uistack(ax1);
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Graphics Object Programming dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!