Title: Theory / Important / CS / Programming / Python / SciPy / Matplotlib / Tutorial
Tags: automatedNewLineAfterCommaSpace

Name: matplotlib
Definition: Comprehensive 2-D plotting

Name: Figure
Context: matplotlib
Example: window
Example2: Jupyter widget

Name: Axes
Definition: an area where points can be specified in terms of x-y coordinates (or theta-r in a polar plot, or x-y-z in a 3D plot, etc.).
Context: matplotlib

Instruction: plt.subplots()
Language: matplotlib
Returns: A figure and an axes

Instruction: ax.plot(
  ar_1,
  ar_2
)
Effect: Add to ax the points ar_1(i), ar_2(i)
Language: matplotlib
Variables: ax an axes

Instruction: plt.figure()
Language: matplotlib
Returns: A figure with no axes

Instruction: plt.subplots(i,j)
Language: matplotlib
Returns: A figure with a ixj grid of Axes

Question: What occurs if a method is used in plt directly instead of in an axes
Answer: It is executed on the current axes
Context: matplotlib

Name: axis
Definition: number-line-like objects
Page: https://matplotlib.org/tutorials/introductory/usage.html#sphx-glr-tutorials-introductory-usage-py
Context: matplotlib

Name: Locator
Definition: Object in charge of finding where to draws tick on an axis
Page: https://matplotlib.org/tutorials/introductory/usage.html#sphx-glr-tutorials-introductory-usage-py
Context: matplotlib

Name: Formatter
Definition: Object in charge of drawing sticks on an axis
Page: https://matplotlib.org/tutorials/introductory/usage.html#sphx-glr-tutorials-introductory-usage-py
Context: matplotlib

Name: Artist
Definition: Everything you can see on the figure
Page: https://matplotlib.org/tutorials/introductory/usage.html#sphx-glr-tutorials-introductory-usage-py
Context: matplotlib

Instruction: set_xlabel(foo)
set_ylabel(foo)
Page: https://matplotlib.org/tutorials/introductory/usage.html#sphx-glr-tutorials-introductory-usage-py
Effect: Add the label in x/y with text foo
Context: matplotlib

Instruction: set_title(foo)
Page: https://matplotlib.org/tutorials/introductory/usage.html#sphx-glr-tutorials-introductory-usage-py
Effect: Add the title foo to the figure
Context: matplotlib

Instruction: ax.legend()
Page: https://matplotlib.org/tutorials/introductory/usage.html#sphx-glr-tutorials-introductory-usage-py
Effect: Show a legend on ax
Context: matplotlib
Variables: ax axes

Instruction: label=foo
Page: https://matplotlib.org/tutorials/introductory/usage.html#sphx-glr-tutorials-introductory-usage-py
Effect: Add to ax the points ar_1(i), ar_2(i) with label foo
Context: matplotlib, pyplot's plot
Variables: ax axes

Name: backend
Definition: the part of the code that generates the figure
Page: https://matplotlib.org/tutorials/introductory/usage.html#sphx-glr-tutorials-introductory-usage-py
Context: matplotlib

Name: frontend
Definition: the part of the code user interact with
Page: https://matplotlib.org/tutorials/introductory/usage.html#sphx-glr-tutorials-introductory-usage-py
Context: matplotlib

Name: interface backend
Definition: Backend which generate interactive code
Page: https://matplotlib.org/tutorials/introductory/usage.html#sphx-glr-tutorials-introductory-usage-py
Context: matplotlib

Name: hardcopy backend
Definition: Backend which generate static images such as png, pdf
Page: https://matplotlib.org/tutorials/introductory/usage.html#sphx-glr-tutorials-introductory-usage-py
Context: matplotlib

Instruction: ion()
Page: https://matplotlib.org/tutorials/introductory/usage.html#sphx-glr-tutorials-introductory-usage-py
Effect: Set current figure to interactive mode. It won't block interaction in python/ipython
Context: matplotlib

Instruction: show()
Page: https://matplotlib.org/tutorials/introductory/usage.html#sphx-glr-tutorials-introductory-usage-py
Effect: Actually show the figure content (only useful in non interactive mode)
Context: matplotlib

Question: How to speed up matplotlib
Answer: mpl.rcParams['path.simplify'] = True,
so that lines are next interupted
Page: https://matplotlib.org/tutorials/introductory/usage.html#sphx-glr-tutorials-introductory-usage-py
Context: matplotlib

Name: pyplot
Definition: A collection of functions that make matplotlib work like MATLAB
Page: https://matplotlib.org/tutorials/introductory/usage.html#sphx-glr-tutorials-introductory-usage-py
Context: matplotlib
Abbreviation: plt

Instruction: plot(ar)
Page: https://matplotlib.org/tutorials/introductory/usage.html#sphx-glr-tutorials-introductory-usage-py
Effect: Add a plot to the axes, with elements at position (i, ar[i])
Context: matplotlib, pyplot

Instruction: "foo"
Page: https://matplotlib.org/tutorials/introductory/usage.html#sphx-glr-tutorials-introductory-usage-py
Effect: Uses plot style foo
Context: matplotlib, pyplot, plot

Instruction: gca()
Page: https://matplotlib.org/tutorials/introductory/usage.html#sphx-glr-tutorials-introductory-usage-py
Effect: The current axes
Context: matplotlib

Instruction: gcf()
Page: https://matplotlib.org/tutorials/introductory/usage.html#sphx-glr-tutorials-introductory-usage-py
Context: matplotlib
Returns: The current figure

Instruction: text(x, y, foo)
Page: https://matplotlib.org/tutorials/introductory/usage.html#sphx-glr-tutorials-introductory-usage-py
Effect: Show text foo at position (x,y)
Context: matplotlib,
  pyplot

Name: imshow
Definition: library to work with images
Page: https://matplotlib.org/tutorials/introductory/sample_plots.html#sphx-glr-tutorials-introductory-sample-plots-py
Context: matplotlib

Name: pcolormesh
Definition: function can make a colored representation of a two-dimensional array, even if the horizontal dimensions are unevenly spaced.
Page: https://matplotlib.org/tutorials/introductory/sample_plots.html#sphx-glr-tutorials-introductory-sample-plots-py
Context: matplotlib

Name: contour
Definition: ?
Page: https://matplotlib.org/tutorials/introductory/sample_plots.html#sphx-glr-tutorials-introductory-sample-plots-py
Context: matplotlib

Name: path
Definition: function to add arbitrary path to a figure
Page: https://matplotlib.org/tutorials/introductory/sample_plots.html#sphx-glr-tutorials-introductory-sample-plots-py
Context: matplotlib

Name: mplot3d
Definition: Library for 3D plotting
Page: https://matplotlib.org/tutorials/introductory/sample_plots.html#sphx-glr-tutorials-introductory-sample-plots-py
Context: matplotlib

Name: streamplot
Definition: plots the streamlines of a vector field
Page: https://matplotlib.org/tutorials/introductory/sample_plots.html#sphx-glr-tutorials-introductory-sample-plots-py
Context: matplotlib

Name: bar
Definition: function to make bar charts, which includes customizations such as error bars
Page: https://matplotlib.org/tutorials/introductory/sample_plots.html#sphx-glr-tutorials-introductory-sample-plots-py
Context: matplotlib

Name: pie
Definition: function to make pie chart
Page: https://matplotlib.org/tutorials/introductory/sample_plots.html#sphx-glr-tutorials-introductory-sample-plots-py
Context: matplotlib

Name: table()
Definition: function adds a text table to an axes.
Page: https://matplotlib.org/tutorials/introductory/sample_plots.html#sphx-glr-tutorials-introductory-sample-plots-py
Context: matplotlib

Name: scatter()
Definition: function makes a scatter plot with (optional) size and color arguments
Page: https://matplotlib.org/tutorials/introductory/sample_plots.html#sphx-glr-tutorials-introductory-sample-plots-py
Context: matplotlib

Name: fill()
Definition: function lets you plot filled curves and polygons
Page: https://matplotlib.org/tutorials/introductory/sample_plots.html#sphx-glr-tutorials-introductory-sample-plots-py
Context: matplotlib

Instruction: semilogx()
semilogy()
Page: https://matplotlib.org/tutorials/introductory/sample_plots.html#sphx-glr-tutorials-introductory-sample-plots-py
Effect: An axes with log plot on x/y axis
Context: matplotlib

Instruction: logolg()
Page: https://matplotlib.org/tutorials/introductory/sample_plots.html#sphx-glr-tutorials-introductory-sample-plots-py
Effect: An axes with log axis
Context: matplotlib

Instruction: polar()
Page: https://matplotlib.org/tutorials/introductory/sample_plots.html#sphx-glr-tutorials-introductory-sample-plots-py
Effect: An axes for polar plot
Context: matplotlib

Name: Subplot
Definition: An axes which is only a part of a figure
Page: https://matplotlib.org/tutorials/introductory/sample_plots.html#sphx-glr-tutorials-introductory-sample-plots-py
Context: matplotlib

Name: Law of exact and opposite advice
Definition: That lots of the advice people give is useful for some people, but that the opposite advice is useful for other people.
Page: https://slatestarcodex.com/2014/03/24/should-you-reverse-any-advice-you-hear/