In [1]:
from ahh import vis, exp

In [2]:
x, y = exp.arr_1d(xy=True)
y2 = exp.arr_1d(y=True)

In [27]:
# syntax of this function:
# x, y, label str, style
# style = plot type/color/linestyle/marker
# plot type = 'l', 'b', 's' = 'line', 'bar', 'scatter'

vis.plot(x, y, 'line label', 'l/g/--/o') # plot green dashed line with markers


Out[27]:
[<matplotlib.axes._subplots.AxesSubplot at 0x7f6233f90780>]
<matplotlib.figure.Figure at 0x7f62344789e8>

In [29]:
vis.plot(x, y, 'line label', 'l', # plot multiple plots stacked
         x, y2, 'bar label', 'b/k', # line + bar
         xlabel='xlabel', ylabel='ylabel', title='title', # add labels
         align='center', alpha=0.5) # customize as you wish


/home/solactus/anaconda3/lib/python3.5/site-packages/matplotlib/cbook/deprecation.py:106: MatplotlibDeprecationWarning: Adding an axes using the same arguments as a previous axes currently reuses the earlier instance.  In a future version, a new instance will always be created and returned.  Meanwhile, this warning can be suppressed, and the future behavior ensured, by passing a unique label to each axes instance.
  warnings.warn(message, mplDeprecation, stacklevel=1)
Out[29]:
[<matplotlib.axes._subplots.AxesSubplot at 0x7f6232eea198>,
 <matplotlib.axes._subplots.AxesSubplot at 0x7f6232eea198>]
<matplotlib.figure.Figure at 0x7f6232ee2e48>

In [22]:
vis.plot(x, y, 'line label', 'l', # plot multiple plots stacked
         x, y2, 'bar label', 'b/k',
         stack=False) # if you would like them separate


Out[22]:
[<matplotlib.axes._subplots.AxesSubplot at 0x7f6230f8dc88>,
 <matplotlib.axes._subplots.AxesSubplot at 0x7f62339d7898>]
<matplotlib.figure.Figure at 0x7f6234a5c898>

In [23]:
vis.plot(x, y, 'line label', 'l', # plot x, y as red line plot
         x, y2, 'scatter label', 's/k/', # plot x, y as black scatter plot
         x, y2, 'bar label', 'b/b', # plot x, y as blue bar plot
         )


/home/solactus/anaconda3/lib/python3.5/site-packages/matplotlib/cbook/deprecation.py:106: MatplotlibDeprecationWarning: Adding an axes using the same arguments as a previous axes currently reuses the earlier instance.  In a future version, a new instance will always be created and returned.  Meanwhile, this warning can be suppressed, and the future behavior ensured, by passing a unique label to each axes instance.
  warnings.warn(message, mplDeprecation, stacklevel=1)
Out[23]:
[<matplotlib.axes._subplots.AxesSubplot at 0x7f6233db3978>,
 <matplotlib.axes._subplots.AxesSubplot at 0x7f6233db3978>,
 <matplotlib.axes._subplots.AxesSubplot at 0x7f6233db3978>]
<matplotlib.figure.Figure at 0x7f6233dfb400>

In [ ]: