Well, almost everything is in the title. I am trying to plot the evolution of the composition of a mixture with time in order to show the evolution of the balance, and I would like to get both : - a different color for each compound - a different pattern (possibly black or grey) for each compound So far I used this code, but I am not happy with it
unset key
set xlabel "Time / h"
set ylabel "Concentration / g/L"
set style fill pattern border -1
set style line 1 lc rgb '#ff0000' lt 1 lw 1.5 # --- red
set style line 2 lc rgb '#cc0033' lt 1 lw 1.5 #
set style line 3 lc rgb '#990066' lt 1 lw 1.5 #
set style line 4 lc rgb '#660099' lt 1 lw 1.5 #
set style line 5 lc rgb '#3300cc' lt 1 lw 1.5 #
set style line 6 lc rgb '#0000ff' lt 1 lw 1.5 #--- blue
set output 'balance.eps'
plot [0:24] [0:0.2] 'mydata.txt' using 1:2 with filledcurves above y1=0 ls 1 fillstyle pattern 0 border -1,\
'' using 1:($2+$3):2 with filledcurves above ls 2 fillstyle pattern 2,\
'' using 1:($2+$3+$4):($2+$3) with filledcurves above ls 3 fillstyle pattern 5,\
'' using 1:($2+$3+$4+$5):($2+$3+$4) with filledcurves above ls 4 fillstyle pattern 8,\
'' using 1:($2+$3+$4+$5+$6):($2+$3+$4+$5) with filledcurves above ls 5 fillstyle pattern 4,\
'' using 1:($2+$3+$4+$5+$6+$7):($2+$3+$4+$5+$6) with filledcurves above ls 6 fillstyle pattern 1
Is there a way to achieve what I am looking for ? I haven't seen many examples of pattern use outside of histograms.
Aucun commentaire:
Enregistrer un commentaire