Matplotlib

Description

Técnico Programação Mind Map on Matplotlib, created by Leonardo Galler on 15/10/2018.
Leonardo Galler
Mind Map by Leonardo Galler, updated more than 1 year ago
Leonardo Galler
Created by Leonardo Galler over 6 years ago
9
0
1 2 3 4 5 (0)

Resource summary

Matplotlib

Annotations:

  • Matplotlib trabalha com o conceito de figuras Importando matplotlib import matplotlib.pyplot as plt import numpy as np
  1. Figure

    Annotations:

    • he whole figure. The figure keeps track of all the child Axes, a smattering of 'special' artists (titles, figure legends, etc), and the canvas. fig = plt.figure() # an empty figure with no axes fig.suptitle('No axes on this figure') # Add a title so we know which it is fig, ax_lst = plt.subplots(2, 2) # a figure with a 2x2 grid of Axes
    1. Axes

      Annotations:

      • This is what you think of as 'a plot', it is the region of the image with the data space. A given figure can contain many Axes, but a given Axes object can only be in one Figure. The Axes contains two (or three in the case of 3D) Axis objects (be aware of the difference between Axes and Axis) which take care of the data limits (the data limits can also be controlled via set via the set_xlim() and set_ylim() Axes methods). Each Axes has a title (set via set_title()), an x-label (set via set_xlabel()), and a y-label set via set_ylabel()).
      1. Axis

        Annotations:

        • These are the number-line-like objects. They take care of setting the graph limits and generating the ticks (the marks on the axis) and ticklabels (strings labeling the ticks). The location of the ticks is determined by a Locator object and the ticklabel strings are formatted by a Formatter. The combination of the correct Locator and Formatter gives very fine control over the tick locations and labels.
        1. Artist

          Annotations:

          • Basically everything you can see on the figure is an artist (even the Figure, Axes, and Axis objects). This includes Text objects, Line2D objects,collection objects, Patch objects ... (you get the idea). When the figure is rendered, all of the artists are drawn to the canvas. Most Artists are tied to an Axes; such an Artist cannot be shared by multiple Axes, or moved from one to another.
        2. Inputs(Datatype)

          Annotations:

          • All of plotting functions expect np.array or np.ma.masked_array as input. Classes that are 'array-like' such as pandas data objects and np.matrixmay or may not work as intended. It is best to convert these to np.array objects prior to plotting.
          1. Matplotlib, pyplot and pylab: how are they related?

            Annotations:

            • Matplotlib is the whole package; matplotlib.pyplot is a module in matplotlib; and pylab is a module that gets installed alongside matplotlib. Pyplot provides the state-machine interface to the underlying object-oriented plotting library. The state-machine implicitly and automatically creates figures and axes to achieve the desired plot.

            Media attachments

            Show full summary Hide full summary

            0 comments

            There are no comments, be the first and leave one below:

            Similar

            RESOLUÇÃO - RDC Nº 50, DE 21 DE FEVEREIRO DE 2002
            Alessandra Campos
            The Heart
            annalieharrison
            Geography - Unit 1A
            NicoleCMB
            enzymes and the organ system
            Nour
            Germany 1918-34
            evie.challis
            GCSE Biology AQA
            isabellabeaumont
            Y11 SACE Biology Ecology Flash Cards
            Ben Goetze
            OCR Physics P4 Revision
            Dan Allibone
            DEV I Part I
            d owen