How to plot something like this?

4 vues (au cours des 30 derniers jours)
Tomislav
Tomislav le 10 Avr 2014
Commenté : Tomislav le 10 Avr 2014
i have same data sets, but i really don't know how to make this kind of plot...

Réponse acceptée

Joseph Cheng
Joseph Cheng le 10 Avr 2014
Where we helped set them horizontally next to each other.
  4 commentaires
Joseph Cheng
Joseph Cheng le 10 Avr 2014
x=[60:20:260]; %set x axis ticks
y=rand(11); %get something to plot
h1=subplot(2,1,2); %setup subplot1
plot(x,y,'-.'); %plot subplot1
box on % leave only x and y axes
xlim([60 260]) %setup some x axis
set(h1,'Xtick',x) %set the x axis ticks to show only x
h1_pos = get(h1,'Position'); %get the position data for sublot1.
y2 = 10*y.^2; %make something up for subplot2
h2=subplot(2,1,1); %make subplot2
plot(x,10*y,'-.'); %plot subplot2
box on
set(h2,'Xcolor',[1 1 1]) %make the Y axis line white
set(h2,'Xtick',[])
xlim([60 260]) %setup some x axis
h2_pos=get(h2,'Position');
set(h2,'Position',[h1_pos(1) h1_pos(2)+h1_pos(4) h2_pos(3:end)]) %using position of subplot1 put subplot2next to it.
3 min of adaptation of what i had in the link
Tomislav
Tomislav le 10 Avr 2014
tnx

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Visual Exploration 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!

Translated by