17. June 2006
Plotting With Gnuplot And Parameter File
How do I set up Gnuplot so that the ouput will be safed to a file, what parameters influence the output.
#Title of the plotdes
set title “Verbrauchsdaten Strom und Gas”
#Title of the x-axis
set xlabel “Monat”
#Title of the y-axis
set ylabel “Strom-/Gasverbrauch in kWh”
#the x-axis is formatted as a date
set xdata time
#the data format for the x-axis data is “06/2006”
set timefmt “%m/%Y”
#the label of the x-axis shall be in the form of “Jun 06”
set format x “%b %y”
#the y-axis shall have 5 subdivisions of the main tics
set mytics 5
#on the x-axis only the months 07/2005 till 06/2006 shall be displayed
set xrange[“07/2005″:”06/2006”]
#the grid shall be behind the plotted data
set grid back
#the line width of the main grid shall be 2, of the sub grid 0,5
set grid mytics lw 2, lw .5
#for the x-axis no grid is displayed
set grid noxtics
#the data will be displayed as boxes which are 80% wide
set boxwidth 0.8 relative
#the boxes will be filled with a 25% intensity
set style fill solid .25
#the legend will be displayed left of the plot
set key left
#output to pdf file
set terminal pdf
#output file will be named “strom_und_gasverbrauch.pdf”
set output ‘strom_und_gasverbrauch.pdf’
#input data is in file “strom_und_gasverbrauch.csv”,
#for Gasverbrauch column 2 is x-axis and
# column 7 isy-axis
# in legend the plot will be described as ‘Gasverbrauch’,
# it will be display as box with color 3
# the second plot uses column 2 and 4 is labeled ‘Stromverbrauch’
# will be displayed as box and with color 1
plot\
‘strom_und_gasverbrauch.csv’ u 2:7 title ‘Gasverbrauch’ w boxes fs 3,\
‘strom_und_gasverbrauch.csv’ u 2:4 title ‘Stromverbrauch’ w boxes fs 1
Hallo,
habe das so gemacht wie du, nur mit meinem Problem, aber bei mir kommt als Ausgabe:
warning: Skipping unreadable file “all.csc”
no data in plot
was könnte der Fehler sein? Liegt es daran das in der Excel Tabelle über den Daten zu jeder Spalte eine Überschrift vorhanden ist?
Freue mich über Infos 🙂
Gruß Sven
Kommentar by Sven —