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]:
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
Out[29]:
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]:
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
)
Out[23]:
In [ ]: