duplicate y-axis for a nested boxplot
2 views (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Graphics Object Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!