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]:
<matplotlib.figure.Figure at 0x7f6563949e10>
/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)

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]:
<matplotlib.figure.Figure at 0x7f6565ccc978>
/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)

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]:
<matplotlib.figure.Figure at 0x7f6563257940>
/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)

In [ ]: