|
From: Ethan A M. <eam...@gm...> - 2016-02-01 04:31:47
|
On Monday, 01 February 2016 03:18:24 AM Emanuel Berg wrote: > I have a project going on here: > > http://user.it.uu.se/~embe8573/everest-plot/ > > If we focus on this plot: > > http://user.it.uu.se/~embe8573/everest-plot/early.png > > I'd like to change two things: > > 1) How can I give the bars more different colors? > Especially if printed on a black-and-white > printer, the bars get too similar. Instead one > can be black, and the other white (with > a border). There are many ways you could specify color. Here is one: set linetype 1 linecolor rgb "white" set linetype 2 linecolor rgb "black" To get a border: set style fill solid 1.0 border > 2) How can I add small digits above each bar, > saying the number which the bar illustrates? > E.g., > > 3 > 2 | > | | 1 > | | | > --------- See 5th plot of this demo http://gnuplot.sourceforge.net/demo_svg_5.0/datastrings.html[1] > > Here is the .gpi file: > > # This file: http://user.it.uu.se/~embe8573/everest-plot/everest.gpi > > set terminal png size 800,600 font "cm-super" > > datastring = sprintf("%s", data) > > set xtics 1 font ",8" rotate by 90 > > if (datastring eq "early.dat") { > set ytics 1 > set key left top height 1 > set title font ",14" "Mount Everest: Framgångsrika bestigningar, dödsfall" > set xtics offset 0.2,graph -0.0475 > } > else { > set ytics 20 > unset key > set xtics offset 0.2,graph -0.045 > } > set ytics font ",6" > > set grid > > set style data histogram > set style fill solid > > plot for [COL=2:3] datastring using COL:xticlabels(1) title column > > -- -------- [1] http://gnuplot.sourceforge.net/demo_svg_5.0/datastrings.html |