X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=demo%2Fhistograms2.dem;fp=demo%2Fhistograms2.dem;h=10f6a04665de4a4d53f726fe8607ada02b87ff52;hb=39ec1247a71f61152a4a7f502a30f06a3896c5da;hp=0000000000000000000000000000000000000000;hpb=06be459be4f5f6a7c6ff878e84f355fb2575caa8;p=gnuplot diff --git a/demo/histograms2.dem b/demo/histograms2.dem new file mode 100644 index 0000000..10f6a04 --- /dev/null +++ b/demo/histograms2.dem @@ -0,0 +1,70 @@ +# +# Example of using histogram modes +# +reset +set title "US immigration from Europe by decade" +set datafile missing "-" +set xtics nomirror rotate by -45 +# +# 'newhistogram' keyword to plot +# +set title "Default Histogram Colouring" +set key under +set key invert +set key autotitle columnhead +set style data histogram +set style histogram clustered gap 1 title offset 2,0.25 +set style fill solid noborder +set boxwidth 0.95 +unset xtics +set xtics rotate by -45 +set xlabel "Immigration from different regions" offset 0,-3 +set ytics +set grid y +set auto y +set bmargin 10 +# +plot \ +newhistogram "Northern Europe", \ +'immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \ +newhistogram "Southern Europe", \ +'' u 9:xtic(1), '' u 17, '' u 22, \ +newhistogram "British Isles", \ +'' u 10:xtic(1), '' u 21 +# +pause -1 "Same plot using explicit histogram start colors" +set title "Explicit start color in 'newhistogram' command" +plot \ +newhistogram "Northern Europe" lt 4, \ +'immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \ +newhistogram "Southern Europe" lt 4, \ +'' u 9:xtic(1), '' u 17, '' u 22, \ +newhistogram "British Isles" lt 4, \ +'' u 10:xtic(1), '' u 21 +# +# +pause -1 "Same plot using explicit histogram start pattern" +set title "Explicit start pattern in 'newhistogram' command" +set style fill pattern 1 border -1 +plot \ +newhistogram "Northern Europe" fs pattern 1, \ +'immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \ +newhistogram "Southern Europe" fs pattern 1, \ +'' u 9:xtic(1), '' u 17, '' u 22, \ +newhistogram "British Isles" fs pattern 1, \ +'' u 10:xtic(1), '' u 21 +# +# +pause -1 "Same plot with both explicit color and pattern" +set title "Explicit start pattern and linetype" +set style fill pattern 1 border -1 +plot \ +newhistogram "Northern Europe" lt 2 fs pattern 1, \ +'immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \ +newhistogram "Southern Europe" lt 2 fs pattern 1, \ +'' u 9:xtic(1), '' u 17, '' u 22, \ +newhistogram "British Isles" lt 2 fs pattern 1, \ +'' u 10:xtic(1), '' u 21 +# +# +pause -1