arnica.plots package

PLOTS

The plots package provides plotting helpers used for computational fluid dynamics (CFD) problems. This includes :

  • HoverItems : adds interactive elements to a matplotlib axis, including lines and markers with hover balloons

Submodules

arnica.plots.hoveritems module

Class to be added to a pyplot axis

allow the easy addition of line and markers featuring hover baloons to a matplotlib axis

fig = plt.figure(figsize=(5, 4), dpi=100) axes = fig.add_subplot(111) hover = HoverItems(axes) (…) axes.plot(x,y,”bar”,color=”blue”, linewidth=1) # line without baloons hover.add_line(x,y,”foo”,color=”red”, linewidth=3) hover.add_marker(x,y,”foo”,color=”blue”, size=10, shape=”x”)

plt.show()

class arnica.plots.hoveritems.HoverItems(ax)

Bases: object

add_line(x, y, label, color=None, linewidth=None)

Add a line to the plot with a tooltip

add_marker(x, y, label, color=None, size=5, shape='o', edgecolor='black')

Add a marker to the plot with a tooltip

clean_hover()

Remove everthing

on_hover(event)