Bonjour,

j'essaye d'empiler deux graphiques de la façon suivante dans gnuplot :

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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
set terminal postscript
set output "data.eps"
set term x11 persist
unset key
NX=1; NY=3
DX=0.01; DY=0.01; SX=0.5; SY=0.4
set bmargin DX; set tmargin DX; set lmargin DY; set rmargin DY

## set the margin of each side of a plot as small as possible
## to connect each plot without space
set size SX*NX+DX*1.5,SY*NY+DY*1.8
set multiplot

set lmargin 10
set bmargin 3


##—— First Figure–bottom

set size SX,SY
set xrange [0:100]
set xlabel "Time (h)"
set yrange [0:90]
set ylabel "Lactate (g.L-1)"
set y2range [0:16]
set y2label "Fumarate or Ethanol (g.L-1)"
set xtics 0,20,100 ### from 0 to 100 with 20 interval
set ytics 0,10,90 nomirror ### from 0 to 90 with 10 interval
set y2tics 0,2,16 ### from 0 to 16 with 2 interval
set origin DX,DY;
plot "fig1.txt" using 1:4 axes x1y1 pointtype 9
plot "fig1.txt" using 1:5 axes x1y2 pointtype 13
plot "fig1.txt" using 1:6 axes x1y2 pointtype 7

###——Second Figure—middle

set origin DX,DY+SY;
set xrange [0:100]
set yrange [0:140]
set ylabel "Used Glucose (g.L-1)"
set y2range*[0:18]
set y2label "Cell Biomass (g.L-1)"
set xtics 0,20,100 ### from 0 to 100 with 20 interval
set ytics 0,20,140 nomirror ### from 0 to 140 with 10 interval
set y2tics 0,2,18 ### from 0 to 18 with 2 interval
unset xtics
plot "fig1.txt" using 1:2 axes x1y1 pointtype 64
plot "fig1.txt" using 1:3 axes x1y2 pointtype 3
unset multiplot
Mais le résultat semble très aléatoire, et je n'ai jamais ce que je veux !
Je ne sais pas pourquoi gnuplot me sort une courbe différente à chaque fois alors que je compile le même script.

Dans le meilleur des cas j'ai ça :



avec comme erreur l'ordonnée n°2 du graphique supérieure qui devrait être "Cell Biomass", et numérotée de 0 à 18 (et non 0 à 16 comme sur le graph inférieur).

J'ai conscience que mon code n'est peut-être pas très propre, et je suis loin de maitriser toutes les subtilités du logiciel ! (je débute).

Le code original était celui-ci : http://kpwu.wordpress.com/2007/11/20...stacked-plots/

Tout aide sera la bienvenue !