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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Object Programming 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!