0% found this document useful (0 votes)
59 views1 page

Gnuplot Multiplot for Voltage, Current, Power

The document contains a gnuplot script for plotting voltage, current, and power data from a CSV file. It sets up the time format for the x-axis and configures multiple plots with specific margins and labels for each graph. The script includes commands to plot data from the CSV file using different columns for each parameter while adjusting the y-axis settings accordingly.

Uploaded by

mirame
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views1 page

Gnuplot Multiplot for Voltage, Current, Power

The document contains a gnuplot script for plotting voltage, current, and power data from a CSV file. It sets up the time format for the x-axis and configures multiple plots with specific margins and labels for each graph. The script includes commands to plot data from the CSV file using different columns for each parameter while adjusting the y-axis settings accordingly.

Uploaded by

mirame
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

set datafile separator ','

#01/02/2020 00:00

set xdata time # tells gnuplot the x axis is time data


set timefmt "%d/%m/%Y %H:%M" # specify our time string format
#set format x "%H:%M" # otherwise it will show only MM:SS

set multiplot

#set xrange[0:10]

# We need place to the left, so make the left margin 30% of screen
set lmargin screen 0.3
#set lmargin 3

##### first plot

#set ytics 0.4


#set yrange[-1.2:1.2]

set ylabel "Voltage" textcolor rgb "red"

plot "r:\\temp\\[Link]" using 1:2 with lines

##### Second plot

#set ytics 1
#set yrange[-3:3]

set ytics offset -8, 0


set ylabel "Current" offset -8, 0 textcolor rgb "green"

#plot 3*cos(x) linecolor 2


plot "r:\\temp\\[Link]" using 1:3 with lines

##### Third plot

set ytics 0.5


set yrange[-1.5:1.5]

set ytics offset -16, 0


set ylabel "Power" offset -16, 0 textcolor rgb "blue"
#plot 3*sin(x)*cos(x) linecolor 3
plot "r:\\temp\\[Link]" '' using 1:4 with lines,

unset multiplot

#plot "r:\\temp\\[Link]" using 1:2 with lines, '' using 1:3 with lines, '' using
1:4 with lines, '' using 1:5 with lines

You might also like