lisa.notebook.axis_link_dataframes#
- lisa.notebook.axis_link_dataframes(axis, df_list, before=1, after=5, cursor_color='red', follow_cursor=False)[source]#
Link some dataframes to an axis displayed in the interactive matplotlib widget.
- Parameters:
axis (matplotlib.axes.Axes) – Axis to link to.
df_list (list(pandas.DataFrame)) – List of pandas dataframe to link.
before (int) – Number of dataframe rows to display before the selected location.
after (int) – Number of dataframe rows to display after the selected location.
cursor_color (str) – Color of the vertical line added at the clicked location.
follow_cursor (bool) – If
True
, the cursor will be followed without the need to click.
When the user clicks on the graph, a vertical marker will appear and the dataframe slice will update to show the relevant row.
Note
This requires the matplotlib widget enabled using
%matplotlib widget
magic.