In [1]:
from ahh import exp, vis
In [2]:
vis.set_figsize(12, 3)
colors = ['red', 'orange', 'blue']
for i, color in enumerate(colors):
x, y = exp.arr_1d(xy=True) # random data
ax = vis.plot_line(x, y,
label_inline=5 + i, # x-value to labeled (plus i to separate them)
label=color.title(),
color=color,
figsize='na'
)
Out[2]:
In [3]:
vis.set_figsize(12, 3)
colors = ['red', 'orange', 'blue']
for i, color in enumerate(colors):
x, y = exp.arr_1d(xy=True) # random data
ax = vis.plot_line(x, y,
label_inline=True, # if scalar isn't provided, defaulst to the median of x
label=color.title(),
color=color,
figsize='na'
)
Out[3]:
In [4]:
vis.set_figsize(12, 3)
colors = ['red', 'orange', 'blue']
for i, color in enumerate(colors):
x, y = exp.arr_1d(xy=True) # random data
ax, line = vis.plot_line(x, y, returnplot=True,
label=color.title(),
color=color,
figsize='na')
vis.set_inline_label(ax, line, xval=7 + i, color=vis.COLORS['gray'], size=12) # call separately to modify settings
Out[4]:
In [ ]: