Skip to content

Instantly share code, notes, and snippets.

@tacaswell
tacaswell / annotate_range.py
Created August 26, 2013 01:45
gist for working on annotation range function
def add_range_annotation(ax, start, end, txt_str, y_height=.5, txt_kwargs=None, arrow_kwargs=None):
"""
Adds horizontal arrow annotation with text in the middle
Parameters
----------
ax : matplotlib.Axes
The axes to draw to
start : float