Bonjour tous,
j'ai un petit probleme que je trouve tres bizarre:
=> j'ai plusieurs courbes à tracer dont 2 que j'appelerai courbe2 et courbe3
=> j'ai tracé toutes mes courbes dans des figures et ensuite j'ai fait la meme chose mais en utilisant subplot
je m'attends donc à avoir rigoureusement la meme chose
=> et bin non, dans le subplot j'ai un changement d'echelle bizarre
=> une partie de la courbe 3 a disparue
=> la courbe 2 à des petits morceaux en trop ...
j'ai mis en pièce jointe le subplot et le plot
=> ce qui est juste selon mes calculs est ce qui s'affichent dans mes plots
=> mais pourquoi ai je donc ces artefactes dans les subplots ?
je vous mets mon code si vous voulez vérifier mais normalement il est bon:
1°) pour les subplots
2°) pour les plots
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 %-----courbe 2---- figure (10) for n=1:1:Nb hold on filename = sprintf('finalDistribution%d.dat',n); matrixValues =load(filename); subplot(2,4,2) h = bar(matrixValues(:,2),matrixValues(:,1),'histc'); set(h,'FaceColor','b') set(gca,'XScale','log') end totalmatrixValues =load('totalFinalDistribution.dat'); hold on subplot(2,4,2) h = bar(totalmatrixValues(:,2),totalmatrixValues(:,1),'histc'); set(h,'FaceColor','r') set(gca,'XScale','log') title('Final Distribution'); %--courbe 3---- matrixValues =load('Time_AtomicFractionInMatrix.dat'); semilogx(matrixValues(:,1),matrixValues(:,2),'.') hold on subplot(2,4,3) semilogx(matrixValues(:,1),matrixValues(:,3),'g o') title('AtomicFractionElementInMatrix');
en espérant que vous pourrez m'aider ...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 %---courbe 2-- figure (2) for n=1:1:Nb filename = sprintf('finalDistribution%d.dat',n); matrixValues =load(filename); h = bar(matrixValues(:,2),matrixValues(:,1),'histc'); set(h,'FaceColor','b') set(gca,'XScale','log') end totalmatrixValues =load('totalFinalDistribution.dat'); hold on h = bar(totalmatrixValues(:,2),totalmatrixValues(:,1),'histc'); set(h,'FaceColor','r') set(gca,'XScale','log') title('Final Distribution'); %--courbe3----------- figure (3) matrixValues =load('Time_AtomicFractionInMatrix.dat'); semilogx(matrixValues(:,1),matrixValues(:,2),'.') hold on semilogx(matrixValues(:,1),matrixValues(:,3),'g o') title('AtomicFractionElementInMatrix');
Partager