GNUPLOT

Sélection de points: option every

every I:J:K:L:M:N

I incrément de ligne
J incrément de bloc 
K la première ligne
L le premier bloc
M la dernière ligne 
N le dernier bloc 
every 2         utilise une ligne sur deux 
every ::3       à partir de la 3ème ligne 
every ::3::5    entre la 3ème et la 5ème ligne 
every 2::::6    lignes 1,3,5,7 every :2 un bloc sur deux 
every :::5::8   entre le 5ème et le 8ème blocs

Histogram

  • histo.gnu
set boxwidth 0.75 absolute
set style fill solid 1.00 border -1
set key outside right top vertical Left reverse enhanced autotitles columnhead nobox
set key invert samplen 4 spacing 1 width 0 height 0
set style histogram rowstacked title  offset character 0, 0, 0
set datafile missing '-'
set style data histograms
set xtics border in scale 1,0.5 nomirror rotate by -45  offset character 0, 0, 0
set title "Oh le joli histogramme"
plot 'histo.dat' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using 6
pause -1
  • histo.dat
# IMMIGRATION BY REGION AND SELECTED COUNTRY OF LAST RESIDENCE
#
Region		Austria	Hungary	Belgium	Czechoslovakia	Denmark
1891-1900	234081	181288	18167	-	50231	30770
1901-1910	668209	808511	41635	-	65285	73379
1911-1920	453649	442693	33746	3426	41983	61897
1921-1930	32868	30680	15846	102194	32430	49610
1931-1940	3563	7861	4817	14393	2559	12623
1941-1950	24860	3469	12189	8347	5393	38809
1951-1960	67106	36637	18575	918	10984	51121
1961-1970	20621	5401	9192	3273	9201	45237

Sous graphes

  • sous_graphe.gp
   set style data histogram
   set style histogram cluster gap 1
   set style fill solid border -1
   set boxwidth 0.9
   plot [:][0:] \
   newhistogram "MX", \
   'nmad_mx.dat' using 2:xtic(1), 'fine_grain_mx.dat' using 2:xtic(1) , "large_grain_mx.dat" using 2:xtic(1) , \
   newhistogram "IB", \
   'nmad_ib.dat' using 2:xtic(1), 'fine_grain_ib.dat' using 2:xtic(1) , "large_grain_ib.dat" using 2:xtic(1) , \
   newhistogram "Multirail", \
   'nmad_multi.dat' using 2:xtic(1), 'fine_grain_multi.dat' using 2:xtic(1) , "large_grain_multi.dat" using 2:xtic(1) 
  • nmad_mx.dat
   1     2.442045
   2     2.452045
   3     2.442045
   4     2.442045
gnuplot.txt · Last modified: 2010/03/11 17:00 by moreaud
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki