Skip to content

Commit

Permalink
add credit for label_line
Browse files Browse the repository at this point in the history
  • Loading branch information
natj committed Jul 2, 2017
1 parent b98f835 commit 213db6d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions label_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
import math
import matplotlib.pyplot as plt

"""
Simple script to label line similar to what contour function does
credits:
Thomas Albrecht
https://stackoverflow.com/questions/19876882/print-string-over-plotted-line-mimic-contour-plot-labels
"""

def label_line(line, label_text, near_i=None, near_x=None, near_y=None, rotation_offset=0, offset=(0,0)):
"""call
l, = plt.loglog(x, y)
Expand Down

0 comments on commit 213db6d

Please sign in to comment.