Metadata-Version: 2.0
Name: matplotlib-label-lines
Version: 0.3.1
Summary: Label lines in matplotlib.
Home-page: https://github.com/cphyc/matplotlib-label-lines
Author: Corentin Cadiou
Author-email: UNKNOWN
License: MIT License
Requires-Dist: matplotlib
Requires-Dist: numpy

Copyright (c) 2017 Corentin Cadiou

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Description: # matplotlib-label-lines
        Label line using matplotlib.
        
        From http://stackoverflow.com/questions/16992038/inline-labels-in-matplotlib (original code from NauticalMile).
        
        ## Install
        
        Just do:
        ```bash
        pip install matplotlib-label-lines
        ```
        and then:
        ```python
        import numpy as np
        from matplotlib import pyplot as plt
        from scipy.stats import loglaplace,chi2
        
        from labellines import labelLine, labelLines
        
        X = np.linspace(0,1,500)
        A = [1,2,5,10,20]
        funcs = [np.arctan,np.sin,loglaplace(4).pdf,chi2(5).pdf]
        
        plt.subplot(221)
        for a in A:
            plt.plot(X,np.arctan(a*X),label=str(a))
        
        labelLines(plt.gca().get_lines(),zorder=2.5)
        
        plt.subplot(222)
        for a in A:
            plt.plot(X,np.sin(a*X),label=str(a))
        
        labelLines(plt.gca().get_lines(),align=False,fontsize=14)
        
        plt.subplot(223)
        for a in A:
            plt.plot(X,loglaplace(4).pdf(a*X),label=str(a))
        
        xvals = [0.8,0.55,0.22,0.104,0.045]
        labelLines(plt.gca().get_lines(),align=False,xvals=xvals,color='k')
        
        plt.subplot(224)
        for a in A:
            plt.plot(X,chi2(5).pdf(a*X),label=str(a))
        
        lines = plt.gca().get_lines()
        l1=lines[-1]
        labelLine(l1,0.6,label=r'$Re=${}'.format(l1.get_label()),ha='left',va='bottom',align = False)
        labelLines(lines[:-1],align=False)
        
        plt.show()
        ```
        
Platform: UNKNOWN
