# -*- coding: utf-8 -*-
#
from helpers import assert_phash


def plot():
    from matplotlib import pyplot as plt
    from matplotlib import style
    import numpy as np
    fig = plt.figure()
    with plt.style.context(('ggplot')):
        t = np.arange(0.0, 2.0, 0.1)
        s = np.sin(2*np.pi*t)
        s2 = np.cos(2*np.pi*t)
        A = plt.cm.jet(np.linspace(0, 1, 10))
        plt.plot(t, s, 'o-', lw=1.5, color=A[5])
        plt.plot(t, s2, 'o-', lw=3, alpha=0.3)
        plt.xlabel('time(s)')
        # plt.xlabel('time(s) _ % $ \\')
        plt.ylabel('Voltage (mV)')
        plt.title('Simple plot $\\frac{\\alpha}{2}$')
        plt.grid(True)
    return fig


def test():
    assert_phash(plot(), '1f36e5ce21c1e5c1')

@@ -57,25 +57,8 @@
 sh%0A%0A
-%0Adef plot():%0A    
 from
@@ -90,20 +90,16 @@
  as plt%0A
-    
 from mat
@@ -119,20 +119,16 @@
 t style%0A
-    
 import n
@@ -138,16 +138,30 @@
 y as np%0A
+%0A%0Adef plot():%0A
     fig 
@@ -704,15 +704,15 @@
 6e5c
-e
+6
 21c1e
-5
+7
 c1')

fix test for travis