duplicate y-axis for a nested boxplot

1 次查看(过去 30 天)
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 个)

类别

Help CenterFile Exchange 中查找有关 Graphics Object Programming 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by