I'm currently trying to produce graphs using gnuplot within a python script but I'm getting this error:
line 0: Can't plot with an empty x range!
I don't know why my xrange isn't being recognised because I have included it in my code as shown below along with the rest of my gnuplot code within my python script.
### GNUPLOT CODE ####
g = Gnuplot.Gnuplot()
g('set terminal png')
# Graph layout settings
g('set term png size 1200, 800')
g('set lmargin 8')
g('set rmargin 4')
g('set tmargin 3')
g('set bmargin 3')
# Set the name of the output file
g('set output "' + outputFile + '"')
# Format the time
g('set timefmt "%H:%M:%S"')
g('set format x "%H:%M:%S"')
# Set title and labels of the graph. Specify where the x axis starts and ends.
g('set title "' + title + '"')
g('set xlabel "time"')
g('set ylabel "percent"')
g('set xrange ["15:43:59":"15:48:56"]')
# Use the .txt file specified by the user to create the graph
g('plot "' + inputFile + '" using 1:3 title "user" with lines')