GnuPlot

Selection of some often used GnuPlot snippets

 
set key top left Left reverse width -9
#drop garbage data
set datafile missing "-999.00"
#axis declarations
set grid
set xrange [0:300]
set yrange [0:60]
set y2label "Wasserverbrauch [cbm]"  textcolor rgb "blue"
set y2tics ("0" 0, "10" 1000, "20" 2000) textcolor rgb "blue"
set logscale x 2
#handle time formated data
set xdata time
set timefmt "%Y-%m-%d"
set format x "%Y/%m"
mark position by vertical line or region by rectangle
set arrow from 25,1 to 25,1.4 nohead lc rgb "red"
set object 1 rect from 20,1 to 24,1.4 back fc rgb "#aaffaa"
some data fitting
s(x)=s1*x+s0
fit [2006:2009] s(x) "energie.txt" u 1:(3.14*$6) via s1,s0
#define line styles
set style line 3 lt 1 lc rgb "#008800" lw 20 pt 7 ps 0
#plot the data
plot \
"arne.dat" u 1 ls 3 w lp ti "raw", \
"arne.dat" u 3:8:9 with errorbars ti "mean", \
"arne.dat" u 4 with imp notitle, \
"arne.dat" u 1:($5*100) w lp  axes x1y2 notitle
pause -1
#combined LaTeX, EPS, use eps2pdf
set term epslatex color solid 12
set output "posInit.eps"
replot
#SVG format
set term svg
set output "EnergieverbrauchPassivhaus.svg"
replot
 
"black"#000000
"maroon"#800000
cherry#D40023
dark red#CC0000
"red"#FF0000
conti#FF9900
bvsm#FBBF16
"yellow"#FFFF00
"lime"#00FF00
"green"#008000
Minzgrün#007243
Opalgrün#005D4C
"teal"#008080
"blue"#0000FF
dark blue#0000CC
"navy"#000080
"purple"#800080
"fuchsia"#FF00FF
light rose#FFDDEE
SMall#C7CEFF
"gray"#808080
"silver"#C0C0C0
"white"#FFFFFF
 
 

 

GnuPlot HEXdecimal
white #ffffff255 255 255
black #000000000 000 000
grey #bebebe190 190 190
light-grey #d3d3d3211 211 211
dark-grey #a9a9a9169 169 169
red #ff0000255 000 000
light-red #f03232240 050 050
dark-red #8b0000139 000 000
yellow #ffff00255 255 000
dark-yellow #c8c800200 200 000
green #00ff00000 255 000
light-green #90ee90144 238 144
dark-green #006400000 100 000
spring-green #00ff7f000 255 127
forest-green #228b22034 139 034
sea-green #2e8b57046 139 087
blue #0000ff000 000 255
light-blue #add8e6173 216 230
dark-blue #00008b000 000 139
midnight-blue #191970025 025 112
navy #000080000 000 128
medium-blue #0000cd000 000 205
royalblue #4169e1065 105 225
skyblue #87ceeb135 206 235
cyan #00ffff000 255 255
dark-cyan #008b8b000 139 139
magenta #ff00ff255 000 255
light-magenta #f055f0240 085 240
dark-magenta #8b008b139 000 139
turquoise #40e0d0064 224 208
dark-turquoise #00ced1000 206 209
pink #ffc0cb255 192 203
dark-pink #ff1493255 020 147
coral #ff7f50255 127 80
orange-red #ff4500255 069 000
salmon #fa8072250 128 114
dark-salmon #e9967a233 150 122
aquamarine #7fffd4127 255 212
khaki #f0e68c240 230 140
dark-khaki #bdb76b189 183 107
goldenrod #daa520218 165 032
light-goldenrod #eedd82238 221 130
dark-goldenrod #b8860b184 134 011
gold #ffd700255 215 000
beige #f5f5dc245 245 220
brown #a52a2a165 042 042
orange #ffa500255 165 000
dark-orange #ff8c00255 140 000
violet #ee82ee238 130 238
dark-violet #9400d3148 000 211
plum #dda0dd221 160 221
purple #a020f0160 032 240
Login
Valid HTML 4.01!