====== Matplotlib ====== Matplotlib est une bibliothèque python pour dessiner des graphiques de toutes sortes (courbes, surfaces, camembert, graphs polaires, histogrammes, etc). Elle fournit une interface prochde de la syntaxe de matlab, mais il reste [[http://matplotlib.sourceforge.net/faq/usage_faq.html|possible]] de l'utiliser de façon plus orientée objet. ===== Doc générale ===== * [[http://matplotlib.sourceforge.net/index.html|Site officiel]] * [[http://matplotlib.sourceforge.net/contents.html|Doc officielle]] * [[http://matplotlib.sourceforge.net/faq/howto_faq.html|HowTo]] (Doc officielle) * [[http://matplotlib.sourceforge.net/users/pyplot_tutorial.html|Tuto]] (Doc officielle) * [[http://matplotlib.sourceforge.net/users/index.html|User's Guide]] (Doc officielle) ===== Unofficial doc ===== * [[http://www.scipy.org/Cookbook/Matplotlib|Cookbook]] (sur SciPy) * [[http://www.scipy.org/Cookbook/Matplotlib/Legend|Legend]] * [[http://math.mad.free.fr/depot/numpy/courbe.html|Tracer des courbes]] (fr) ===== Elements utiles (en premier lieu) de l'API ===== * [[http://matplotlib.sourceforge.net/api/pyplot_api.html|Pyplot]] * [[http://matplotlib.sourceforge.net/api/figure_api.html|Figure]] * [[http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.figure|Créer une instance de Figure]] * [[http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.savefig|Save Figure]] * [[http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.clf|Clear Figure]] * [[http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.plotfile|Plot File]] (Plotter directement depuis un fichier .*sv) ===== Astuces ===== * [[http://matplotlib.sourceforge.net/faq/howto_faq.html#move-the-edge-of-an-axes-to-make-room-for-tick-labels|Faire de la place pour les étiquettes des axes (ticks)]] * [[http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg06176.html|Discussion sur les légendes et le fait que personne ne sait les faire sortir de la zone de dessin]] * [[http://www.scipy.org/Cookbook/Matplotlib/AdjustingImageSize|Cookbook autour du dimensionnement des images]] * [[http://matplotlib.sourceforge.net/api/ticker_api.html?highlight=ticker#matplotlib.ticker.FuncFormatter|Documentation sur les ticks (les labels sur les axes)]] * [[http://matplotlib.sourceforge.net/api/figure_api.html?highlight=autofmt#matplotlib.figure.Figure.autofmt_xdate|Doc sur la légende et l'auto-format pour les ticks date]] * [[http://matplotlib.sourceforge.net/plot_directive/mpl_examples/pylab_examples/figlegend_demo.py|Un exemple sur les légendes]] ===== Différents types de graphiques ===== * [[http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.bar|Diagramme en barres]] * [[http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.pie|Camembert]] * [[http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.polar|Graph polaire]] * [[http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.hist|Histogramme]] * Exemple: [[http://matplotlib.sourceforge.net/examples/api/radar_chart.html|Graph RADAR]]