duplicate y-axis for a nested boxplot

1 Ansicht (letzte 30 Tage)
Sam Alex
Sam Alex am 10 Jan. 2013
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);

Antworten (0)

Kategorien

Mehr zu Graphics Object Programming finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by