In [1]:
from ahh import exp, vis
import matplotlib.pyplot as plt
import pandas as pd

In [2]:
x = pd.date_range('2016-01-01', '2017-02-01', freq='7D')
y = exp.arr_1d(len(x), y=True)

In [3]:
vis.plot_line(x, y) # automatically sets date labels intelligently


Out[3]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f4be101eba8>

In [4]:
vis.plot_bar(x, y) # works for other types of plots as well


Out[4]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f4be0840d68>

In [5]:
vis.plot_scatter(x, y) # works for other types of plots as well


Out[5]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f4be0e7a9e8>

In [6]:
x = pd.date_range('2016-01-01', '2016-05-01', freq='7D') # works for different time periods as well 
y = exp.arr_1d(len(x), y=True)
vis.plot_line(x, y) # automatically sets date labels intelligently


Out[6]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f4be39a92b0>

In [7]:
x = pd.date_range('2016-01-01', '2016-8-01', freq='7D') # works for different time periods as well 
y = exp.arr_1d(len(x), y=True)
vis.plot_line(x, y) # automatically sets date labels intelligently


Out[7]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f4be3dae588>

In [8]:
x = pd.date_range('2016-01-01', '2016-2-25', freq='3D') # works for different time periods as well 
y = exp.arr_1d(len(x), y=True)
vis.plot_line(x, y) # automatically sets date labels intelligently


Out[8]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f4be2a99cf8>

In [9]:
x = pd.date_range('2016-01-01', '2016-1-4', freq='8H') # works for different time periods as well 
y = exp.arr_1d(len(x), y=True)
vis.plot_line(x, y) # automatically sets date labels intelligently


Out[9]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f4be2deb358>

In [10]:
x = pd.date_range('2016-01-01', '2016-1-2', freq='1H') # works for different time periods as well 
y = exp.arr_1d(len(x), y=True)
vis.plot_line(x, y) # automatically sets date labels intelligently


Out[10]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f4be509d7f0>

In [ ]: