pipe plot data to gnuplot script

If you are on a Unix system (i.e. not Windows) you can use ‘<cat’ instead of ‘-‘ to read from stdin: plot ‘<cat’ using … Then you can do cat data.txt | gnuplot script.gp. However, in the specific case you mention in your question, with the plot in the for loop, you read the input … Read more

Plotting labeled intervals in matplotlib/gnuplot

Updated: Now includes handling the data sample and uses mpl dates functionality. import matplotlib.pyplot as plt from matplotlib.dates import DateFormatter, MinuteLocator, SecondLocator import numpy as np from StringIO import StringIO import datetime as dt ### The example data a=StringIO(“””a 10:15:22 10:15:30 OK b 10:15:23 10:15:28 OK c 10:16:00 10:17:10 FAILED b 10:16:30 10:16:50 OK “””) … Read more