Hi,
sorry for asking this question, but i'm new in Gnuplot and little confused.
I have a data file (plot_size_transferd.csv) in csv format and a plot file like:
###############################
set title 'Size transfered'
set xlabel 'Date'
set ylabel 'Transfered size (GB)'
set grid x2tics ytics
set datafile separator ";"
set xtics rotate by 90 right out nomirror
set term jpeg enhanced giant size 1024,768
set output 'size_transfered.jpg'
plot "plot_size_transferd.csv" title "CDGSHG" with line lt -1 lw 1 linecolor rgb "blue"
###############################
if i run my gnuplot file i get a graph like you can see in file 'wrong_graph.PNG', but i expect a graph like in 'file expected_graph.PNG', which i created in excel withou any modifications.
can you please explain me, whats wrong whith my plot file ??
Thanks in advance.
FK
Gnuplot question
Gnuplot question
- Attachments
-
- plot_size_transferd.csv
- this is my data file
- (1.47 KiB) Downloaded 47 times
-
- this is what i get from Gnuplot
- wrong_graph.PNG (68.44 KiB) Viewed 1594 times
-
- this is what i expect
- expected_graph.PNG (87.39 KiB) Viewed 1594 times
Re: Gnuplot question
The question "How to use Gnuplot?" is not specific to CentOS.
Out of curiosity I did browse gnuplot's own website and got these:
Gnuplot was not happy about the header line (columnhead), so found a way to ignore.
The 'timefmt' tells how to read time from file.
The 'xdata time' tells that x-values are time.
The 'plot' had to have 'using 1:2' explicitly.
Out of curiosity I did browse gnuplot's own website and got these:
Code: Select all
set ylabel 'Size transfered'
set xlabel 'Date'
set title 'Transfered size (GB)'
set grid x2tics ytics
set datafile separator ";"
set xtics rotate by 90 right out nomirror
set key autotitle columnhead
unset key
set timefmt "%Y.%m.%d-%H:%M:%S"
set xdata time
set format x "%Y.%m.%d"
set term jpeg enhanced giant size 1024,768
set output 'size_transfered.jpg'
plot "plot_size_transferd.csv" using 1:2 title "CDGSHG" with line lt -1 lw 1 linecolor rgb "blue"
The 'timefmt' tells how to read time from file.
The 'xdata time' tells that x-values are time.
The 'plot' had to have 'using 1:2' explicitly.