#!/usr/bin/python

# Raspi-sump, a sump pump monitoring system.
# Al Audet
# http://www.linuxnorth.org/raspi-sump/

import time
import numpy as np
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
from matplotlib import rcParams
rcParams.update({'figure.autolayout': True})

filename = "/home/pi/raspi-sump/charts/today.png" 

def graph(filename):
    csvfile = "/home/pi/raspi-sump/csv/waterlevel-%s.csv" % time.strftime('%Y%m%d')
    date, value = np.loadtxt(csvfile, delimiter=',', unpack=True,
            converters = {0:mdates.strpdate2num('%H:%M:%S')})

    fig = plt.figure(figsize=(8,3))        
    ax1 = fig.add_subplot(111, axisbg='white')

    plt.plot_date(x=date, y=value, ls='solid', color='green', fmt=':')
    title = "Sump Pit Water Level %s" % time.strftime('%Y-%m-%d %H:%M')
    plt.title(title)
    plt.ylabel('Water Level (centimeters)')
    plt.xlabel('Time of Day')
    plt.xticks(rotation=30)    
    plt.grid(True)
    plt.savefig(filename,dpi=72)

graph(filename)

@@ -16,105 +16,8 @@
 on%0A%0A
-# Raspi-sump, a sump pump monitoring system.%0A# Al Audet%0A# http://www.linuxnorth.org/raspi-sump/%0A%0A
 impo
@@ -227,23 +227,22 @@
 True%7D)%0A%0A
+csv
 fil
-enam
 e = %22/ho
@@ -263,131 +263,137 @@
 mp/c
-harts/today.png%22 %0A%0Adef graph(filename):%0A    csvfile = %22/home/pi/raspi-sump/csv/waterlevel-%25s.csv%22 %25 time.strftime('%25Y%25m%25d')
+sv/waterlevel-%25s.csv%22 %25 time.strftime('%25Y%25m%25d')%0Afilename = %22/home/pi/raspi-sump/charts/today.png%22 %0A%0Adef graph(csvfile, filename):
 %0A   
@@ -517,17 +517,16 @@
 :%25S')%7D)%0A
-%0A
     fig 
@@ -551,11 +551,14 @@
 ze=(
-8,3
+10,3.5
 ))  
@@ -609,18 +609,70 @@
 ='white'
+, frameon=False)%0A    rcParams.update(%7B'font.size': 9%7D
 )
-%0A
 %0A    plt
@@ -715,20 +715,35 @@
 d', 
-color='green
+linewidth=2, color='#FB921D
 ', f
@@ -821,24 +821,28 @@
  %25H:%25M')%0A   
+ t =
  plt.title(t
@@ -855,34 +855,73 @@
     
-plt.ylabel('Water Level (c
+t.set_y(1.09)%0A    plt.subplots_adjust(top=0.86)%0A    plt.ylabel('C
 enti
@@ -926,17 +926,16 @@
 timeters
-)
 ')%0A    p
@@ -1008,16 +1008,107 @@
 rid(True
+, color='#ECE5DE', linestyle='solid')%0A    plt.tick_params(axis='x', bottom='off', top='off'
 )%0A    pl
@@ -1141,16 +1141,25 @@
 %0A%0Agraph(
+csvfile, 
 filename

Change code in todaychart.py to make graph nicer looking