Module Expr Str Import alias identifier Import alias identifier ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr Num Num Assign TupleStore NameStore TupleStore TupleStore NameStore NameStore TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr ListLoad Num Num ListLoad Num Num Expr Call AttributeLoad NameLoad attr TupleLoad Num Num TupleLoad Num Num keyword NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad BinOpPow NameLoad Num Expr Call AttributeLoad NameLoad attr TupleLoad Num Num TupleLoad Num Num keyword NameLoad keyword Dict Str Str keyword Dict Str TupleLoad Num Num Num Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad BinOpPow NameLoad Num Expr Call AttributeLoad NameLoad attr TupleLoad Num Num TupleLoad Num Num keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad BinOpPow NameLoad Num Expr Call AttributeLoad NameLoad attr TupleLoad Num Num Num keyword NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr
N/A N/A 
============
Slope marker
============

When viewing data, it's often helpful to add a marker representing the
predicted or measured slope. ``mpltools.annotation.slope_marker`` provides
a simple way of adding a slope marker by specifying the origin of the marker
(normally, the left-most corner of the marker, but, when ``invert=True``, it's
the right-most corner) and the slope---either as a float value or a (rise, run)
tuple.
 N/A numpy np N/A matplotlib.pyplot plt mpltools annotation N/A x N/A N/A np logspace 0 2 N/A N/A fig N/A N/A ax1 ax2 N/A ax3 ax4 N/A N/A plt subplots 2 2 N/A N/A N/A ax1 plot N/A 0 2 N/A 1 0 N/A N/A N/A annotation slope_marker N/A 1 0.6 N/A -1 2 ax ax1 N/A N/A N/A ax1 set_title linear, negative slope N/A N/A N/A ax2 loglog x N/A x 0.5 N/A N/A N/A annotation slope_marker N/A 10 2 N/A 1 2 ax ax2 text_kwargs N/A color cornflowerblue poly_kwargs N/A facecolor N/A 0.73 0.8 1 N/A N/A N/A ax2 set_title loglog, custom colors N/A N/A N/A ax3 loglog x N/A x 0.5 N/A N/A N/A annotation slope_marker N/A 10 4 N/A 1 2 invert True ax ax3 N/A N/A N/A ax3 set_title loglog, `invert=True` N/A N/A N/A ax4 loglog x N/A x 0.5 N/A N/A N/A annotation slope_marker N/A 10 2 0.5 ax ax4 N/A N/A N/A ax4 set_title loglog, float slope N/A N/A N/A plt tight_layout N/A N/A N/A plt show