e42.uk Circle Device

 

Quick Reference

GNUplot Quick Reference

GNUplot Quick Reference

To use a , as the separator (normally it is a space)

set datafile separator ','

To parse a nearly ISO8601 date and time (2020-10-16 11:20:40):

set xdata time
set timefmt '%Y-%m-%d %H:%M:%S'

To format the x axis with a full date and time (like above):

set format x "%Y-%m-%d %H:%M:%S"

Write the chart to a file

basename='plotbasename'
set terminal pngcairo size 1250,750 enhanced font 'Verdana,10'
set output sprintf("%s%s", basename, ".png")

unset output

Display two data sets with different scales on left and right:

set datafile separator ','

set xdata time
set timefmt '%Y-%m-%d %H:%M:%S'

set format x "%Y-%m-%d %H:%M:%S"

set y2tics

plot "data1.csv" using 1:2 with lines, \
    "data2.csv" using 1:2 with lines axes x1y2

The above assumes that the data is stored as below:

2022-01-01 00:00:00,1
2022-01-01 00:01:00,2
2022-01-01 00:02:00,3
...

Point and line style list and Point and line styles (mono) these great examples were taken from http://stelweb.asu.cas.cz/~nemeth/work/stuff/gnuplot/.

Quick Links: Techie Stuff | General | Personal | Quick Reference