Skip to content

Commit 4689935

Browse files
committed
Update toplevel to 3.3.4.
1 parent aa7c836 commit 4689935

File tree

4,176 files changed

+785158
-719482
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,176 files changed

+785158
-719482
lines changed

Matplotlib.pdf

-11 KB
Binary file not shown.

_downloads/0017d0c84e03d6c5e463e23d8e570671/line_collection.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"cell_type": "markdown",
1616
"metadata": {},
1717
"source": [
18-
"\n# Line Collection\n\n\nPlotting lines with Matplotlib.\n\n`~matplotlib.collections.LineCollection` allows one to plot multiple\nlines on a figure. Below we show off some of its properties.\n"
18+
"\n# Line Collection\n\nPlotting lines with Matplotlib.\n\n`~matplotlib.collections.LineCollection` allows one to plot multiple\nlines on a figure. Below we show off some of its properties.\n"
1919
]
2020
},
2121
{
@@ -51,7 +51,7 @@
5151
"cell_type": "markdown",
5252
"metadata": {},
5353
"source": [
54-
"------------\n\nReferences\n\"\"\"\"\"\"\"\"\"\"\n\nThe use of the following functions, methods, classes and modules is shown\nin this example:\n\n"
54+
"------------\n\n## References\n\nThe use of the following functions, methods, classes and modules is shown\nin this example:\n\n"
5555
]
5656
},
5757
{

_downloads/003118d8eb1e7df55671bcdf18bfac3c/sample_plots.ipynb

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

_downloads/015f3d8484e7cc976026793f37ae6042/demo_ticklabel_alignment.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"cell_type": "markdown",
1616
"metadata": {},
1717
"source": [
18-
"\n# Demo Ticklabel Alignment\n\n"
18+
"\n# Demo Ticklabel Alignment\n"
1919
]
2020
},
2121
{

_downloads/02be334176b42a5c4d2cd469f107ff92/images.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"cell_type": "markdown",
1616
"metadata": {},
1717
"source": [
18-
"\n# Image tutorial\n\n\nA short tutorial on plotting images with Matplotlib.\n\n\nStartup commands\n===================\n\nFirst, let's start IPython. It is a most excellent enhancement to the\nstandard Python prompt, and it ties in especially well with\nMatplotlib. Start IPython either directly at a shell, or with the Jupyter\nNotebook (where IPython as a running kernel).\n\nWith IPython started, we now need to connect to a GUI event loop. This\ntells IPython where (and how) to display plots. To connect to a GUI\nloop, execute the **%matplotlib** magic at your IPython prompt. There's more\ndetail on exactly what this does at `IPython's documentation on GUI\nevent loops\n<https://ipython.readthedocs.io/en/stable/interactive/reference.html#gui-event-loop-support>`_.\n\nIf you're using Jupyter Notebook, the same commands are available, but\npeople commonly use a specific argument to the %matplotlib magic:\n\n.. sourcecode:: ipython\n\n In [1]: %matplotlib inline\n\nThis turns on inline plotting, where plot graphics will appear in your\nnotebook. This has important implications for interactivity. For inline plotting, commands in\ncells below the cell that outputs a plot will not affect the plot. For example,\nchanging the color map is not possible from cells below the cell that creates a plot.\nHowever, for other backends, such as Qt5, that open a separate window,\ncells below those that create the plot will change the plot - it is a\nlive object in memory.\n\nThis tutorial will use Matplotlib's imperative-style plotting\ninterface, pyplot. This interface maintains global state, and is very\nuseful for quickly and easily experimenting with various plot\nsettings. The alternative is the object-oriented interface, which is also\nvery powerful, and generally more suitable for large application\ndevelopment. If you'd like to learn about the object-oriented\ninterface, a great place to start is our :doc:`Usage guide\n</tutorials/introductory/usage>`. For now, let's get on\nwith the imperative-style approach:\n"
18+
"\n# Image tutorial\n\nA short tutorial on plotting images with Matplotlib.\n\n\n## Startup commands\n\nFirst, let's start IPython. It is a most excellent enhancement to the\nstandard Python prompt, and it ties in especially well with\nMatplotlib. Start IPython either directly at a shell, or with the Jupyter\nNotebook (where IPython as a running kernel).\n\nWith IPython started, we now need to connect to a GUI event loop. This\ntells IPython where (and how) to display plots. To connect to a GUI\nloop, execute the **%matplotlib** magic at your IPython prompt. There's more\ndetail on exactly what this does at `IPython's documentation on GUI\nevent loops\n<https://ipython.readthedocs.io/en/stable/interactive/reference.html#gui-event-loop-support>`_.\n\nIf you're using Jupyter Notebook, the same commands are available, but\npeople commonly use a specific argument to the %matplotlib magic:\n\n.. sourcecode:: ipython\n\n In [1]: %matplotlib inline\n\nThis turns on inline plotting, where plot graphics will appear in your\nnotebook. This has important implications for interactivity. For inline plotting, commands in\ncells below the cell that outputs a plot will not affect the plot. For example,\nchanging the color map is not possible from cells below the cell that creates a plot.\nHowever, for other backends, such as Qt5, that open a separate window,\ncells below those that create the plot will change the plot - it is a\nlive object in memory.\n\nThis tutorial will use Matplotlib's imperative-style plotting\ninterface, pyplot. This interface maintains global state, and is very\nuseful for quickly and easily experimenting with various plot\nsettings. The alternative is the object-oriented interface, which is also\nvery powerful, and generally more suitable for large application\ndevelopment. If you'd like to learn about the object-oriented\ninterface, a great place to start is our :doc:`Usage guide\n</tutorials/introductory/usage>`. For now, let's get on\nwith the imperative-style approach:\n"
1919
]
2020
},
2121
{
@@ -33,7 +33,7 @@
3333
"cell_type": "markdown",
3434
"metadata": {},
3535
"source": [
36-
"\nImporting image data into Numpy arrays\n======================================\n\nMatplotlib relies on the Pillow_ library to load image data.\n\n\nHere's the image we're going to play with:\n\n![](../../_static/stinkbug.png)\n\n\nIt's a 24-bit RGB PNG image (8 bits for each of R, G, B). Depending\non where you get your data, the other kinds of image that you'll most\nlikely encounter are RGBA images, which allow for transparency, or\nsingle-channel grayscale (luminosity) images. You can right click on\nit and choose \"Save image as\" to download it to your computer for the\nrest of this tutorial.\n\nAnd here we go...\n\n"
36+
"\n## Importing image data into Numpy arrays\n\nMatplotlib relies on the Pillow_ library to load image data.\n\n\nHere's the image we're going to play with:\n\n<img src=\"file://../../_static/stinkbug.png\">\n\nIt's a 24-bit RGB PNG image (8 bits for each of R, G, B). Depending\non where you get your data, the other kinds of image that you'll most\nlikely encounter are RGBA images, which allow for transparency, or\nsingle-channel grayscale (luminosity) images. You can right click on\nit and choose \"Save image as\" to download it to your computer for the\nrest of this tutorial.\n\nAnd here we go...\n\n"
3737
]
3838
},
3939
{
@@ -51,7 +51,7 @@
5151
"cell_type": "markdown",
5252
"metadata": {},
5353
"source": [
54-
"Note the dtype there - float32. Matplotlib has rescaled the 8 bit\ndata from each channel to floating point data between 0.0 and 1.0. As\na side note, the only datatype that Pillow can work with is uint8.\nMatplotlib plotting can handle float32 and uint8, but image\nreading/writing for any format other than PNG is limited to uint8\ndata. Why 8 bits? Most displays can only render 8 bits per channel\nworth of color gradation. Why can they only render 8 bits/channel?\nBecause that's about all the human eye can see. More here (from a\nphotography standpoint): `Luminous Landscape bit depth tutorial\n<https://luminous-landscape.com/bit-depth/>`_.\n\nEach inner list represents a pixel. Here, with an RGB image, there\nare 3 values. Since it's a black and white image, R, G, and B are all\nsimilar. An RGBA (where A is alpha, or transparency), has 4 values\nper inner list, and a simple luminance image just has one value (and\nis thus only a 2-D array, not a 3-D array). For RGB and RGBA images,\nMatplotlib supports float32 and uint8 data types. For grayscale,\nMatplotlib supports only float32. If your array data does not meet\none of these descriptions, you need to rescale it.\n\n\nPlotting numpy arrays as images\n===================================\n\nSo, you have your data in a numpy array (either by importing it, or by\ngenerating it). Let's render it. In Matplotlib, this is performed\nusing the :func:`~matplotlib.pyplot.imshow` function. Here we'll grab\nthe plot object. This object gives you an easy way to manipulate the\nplot from the prompt.\n\n"
54+
"Note the dtype there - float32. Matplotlib has rescaled the 8 bit\ndata from each channel to floating point data between 0.0 and 1.0. As\na side note, the only datatype that Pillow can work with is uint8.\nMatplotlib plotting can handle float32 and uint8, but image\nreading/writing for any format other than PNG is limited to uint8\ndata. Why 8 bits? Most displays can only render 8 bits per channel\nworth of color gradation. Why can they only render 8 bits/channel?\nBecause that's about all the human eye can see. More here (from a\nphotography standpoint): `Luminous Landscape bit depth tutorial\n<https://luminous-landscape.com/bit-depth/>`_.\n\nEach inner list represents a pixel. Here, with an RGB image, there\nare 3 values. Since it's a black and white image, R, G, and B are all\nsimilar. An RGBA (where A is alpha, or transparency), has 4 values\nper inner list, and a simple luminance image just has one value (and\nis thus only a 2-D array, not a 3-D array). For RGB and RGBA images,\nMatplotlib supports float32 and uint8 data types. For grayscale,\nMatplotlib supports only float32. If your array data does not meet\none of these descriptions, you need to rescale it.\n\n\n## Plotting numpy arrays as images\n\nSo, you have your data in a numpy array (either by importing it, or by\ngenerating it). Let's render it. In Matplotlib, this is performed\nusing the :func:`~matplotlib.pyplot.imshow` function. Here we'll grab\nthe plot object. This object gives you an easy way to manipulate the\nplot from the prompt.\n\n"
5555
]
5656
},
5757
{
@@ -69,7 +69,7 @@
6969
"cell_type": "markdown",
7070
"metadata": {},
7171
"source": [
72-
"You can also plot any numpy array.\n\n\nApplying pseudocolor schemes to image plots\n-------------------------------------------------\n\nPseudocolor can be a useful tool for enhancing contrast and\nvisualizing your data more easily. This is especially useful when\nmaking presentations of your data using projectors - their contrast is\ntypically quite poor.\n\nPseudocolor is only relevant to single-channel, grayscale, luminosity\nimages. We currently have an RGB image. Since R, G, and B are all\nsimilar (see for yourself above or in your data), we can just pick one\nchannel of our data:\n\n"
72+
"You can also plot any numpy array.\n\n\n### Applying pseudocolor schemes to image plots\n\nPseudocolor can be a useful tool for enhancing contrast and\nvisualizing your data more easily. This is especially useful when\nmaking presentations of your data using projectors - their contrast is\ntypically quite poor.\n\nPseudocolor is only relevant to single-channel, grayscale, luminosity\nimages. We currently have an RGB image. Since R, G, and B are all\nsimilar (see for yourself above or in your data), we can just pick one\nchannel of our data:\n\n"
7373
]
7474
},
7575
{
@@ -123,7 +123,7 @@
123123
"cell_type": "markdown",
124124
"metadata": {},
125125
"source": [
126-
"<div class=\"alert alert-info\"><h4>Note</h4><p>However, remember that in the Jupyter Notebook with the inline backend,\n you can't make changes to plots that have already been rendered. If you\n create imgplot here in one cell, you cannot call set_cmap() on it in a later\n cell and expect the earlier plot to change. Make sure that you enter these\n commands together in one cell. plt commands will not change plots from earlier\n cells.</p></div>\n\nThere are many other colormap schemes available. See the `list and\nimages of the colormaps\n<../colors/colormaps.html>`_.\n\n\nColor scale reference\n------------------------\n\nIt's helpful to have an idea of what value a color represents. We can\ndo that by adding a color bar to your figure:\n\n"
126+
"<div class=\"alert alert-info\"><h4>Note</h4><p>However, remember that in the Jupyter Notebook with the inline backend,\n you can't make changes to plots that have already been rendered. If you\n create imgplot here in one cell, you cannot call set_cmap() on it in a later\n cell and expect the earlier plot to change. Make sure that you enter these\n commands together in one cell. plt commands will not change plots from earlier\n cells.</p></div>\n\nThere are many other colormap schemes available. See the `list and\nimages of the colormaps\n<../colors/colormaps.html>`_.\n\n\n### Color scale reference\n\nIt's helpful to have an idea of what value a color represents. We can\ndo that by adding a color bar to your figure:\n\n"
127127
]
128128
},
129129
{
@@ -141,7 +141,7 @@
141141
"cell_type": "markdown",
142142
"metadata": {},
143143
"source": [
144-
"\nExamining a specific data range\n---------------------------------\n\nSometimes you want to enhance the contrast in your image, or expand\nthe contrast in a particular region while sacrificing the detail in\ncolors that don't vary much, or don't matter. A good tool to find\ninteresting regions is the histogram. To create a histogram of our\nimage data, we use the :func:`~matplotlib.pyplot.hist` function.\n\n"
144+
"\n### Examining a specific data range\n\nSometimes you want to enhance the contrast in your image, or expand\nthe contrast in a particular region while sacrificing the detail in\ncolors that don't vary much, or don't matter. A good tool to find\ninteresting regions is the histogram. To create a histogram of our\nimage data, we use the :func:`~matplotlib.pyplot.hist` function.\n\n"
145145
]
146146
},
147147
{
@@ -195,7 +195,7 @@
195195
"cell_type": "markdown",
196196
"metadata": {},
197197
"source": [
198-
"\nArray Interpolation schemes\n---------------------------\n\nInterpolation calculates what the color or value of a pixel \"should\"\nbe, according to different mathematical schemes. One common place\nthat this happens is when you resize an image. The number of pixels\nchange, but you want the same information. Since pixels are discrete,\nthere's missing space. Interpolation is how you fill that space.\nThis is why your images sometimes come out looking pixelated when you\nblow them up. The effect is more pronounced when the difference\nbetween the original image and the expanded image is greater. Let's\ntake our image and shrink it. We're effectively discarding pixels,\nonly keeping a select few. Now when we plot it, that data gets blown\nup to the size on your screen. The old pixels aren't there anymore,\nand the computer has to draw in pixels to fill that space.\n\nWe'll use the Pillow library that we used to load the image also to resize\nthe image.\n\n"
198+
"\n### Array Interpolation schemes\n\nInterpolation calculates what the color or value of a pixel \"should\"\nbe, according to different mathematical schemes. One common place\nthat this happens is when you resize an image. The number of pixels\nchange, but you want the same information. Since pixels are discrete,\nthere's missing space. Interpolation is how you fill that space.\nThis is why your images sometimes come out looking pixelated when you\nblow them up. The effect is more pronounced when the difference\nbetween the original image and the expanded image is greater. Let's\ntake our image and shrink it. We're effectively discarding pixels,\nonly keeping a select few. Now when we plot it, that data gets blown\nup to the size on your screen. The old pixels aren't there anymore,\nand the computer has to draw in pixels to fill that space.\n\nWe'll use the Pillow library that we used to load the image also to resize\nthe image.\n\n"
199199
]
200200
},
201201
{

_downloads/02d0c4a462fb00f782e5ac08185695e5/linestyles.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"cell_type": "markdown",
1616
"metadata": {},
1717
"source": [
18-
"\n# Linestyles\n\n\nSimple linestyles can be defined using the strings \"solid\", \"dotted\", \"dashed\"\nor \"dashdot\". More refined control can be achieved by providing a dash tuple\n``(offset, (on_off_seq))``. For example, ``(0, (3, 10, 1, 15))`` means\n(3pt line, 10pt space, 1pt line, 15pt space) with no offset. See also\n`.Line2D.set_linestyle`.\n\n*Note*: The dash style can also be configured via `.Line2D.set_dashes`\nas shown in :doc:`/gallery/lines_bars_and_markers/line_demo_dash_control`\nand passing a list of dash sequences using the keyword *dashes* to the\ncycler in :doc:`property_cycle </tutorials/intermediate/color_cycle>`.\n"
18+
"\n# Linestyles\n\nSimple linestyles can be defined using the strings \"solid\", \"dotted\", \"dashed\"\nor \"dashdot\". More refined control can be achieved by providing a dash tuple\n``(offset, (on_off_seq))``. For example, ``(0, (3, 10, 1, 15))`` means\n(3pt line, 10pt space, 1pt line, 15pt space) with no offset. See also\n`.Line2D.set_linestyle`.\n\n*Note*: The dash style can also be configured via `.Line2D.set_dashes`\nas shown in :doc:`/gallery/lines_bars_and_markers/line_demo_dash_control`\nand passing a list of dash sequences using the keyword *dashes* to the\ncycler in :doc:`property_cycle </tutorials/intermediate/color_cycle>`.\n"
1919
]
2020
},
2121
{

_downloads/03585d6b78bfd2b18947ed85f9f740e0/centered_spines_with_arrows.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"cell_type": "markdown",
1616
"metadata": {},
1717
"source": [
18-
"\n# Centered spines with arrows\n\n\nThis example shows a way to draw a \"math textbook\" style plot, where the\nspines (\"axes lines\") are drawn at ``x = 0`` and ``y = 0``, and have arrows at\ntheir ends.\n"
18+
"\n# Centered spines with arrows\n\nThis example shows a way to draw a \"math textbook\" style plot, where the\nspines (\"axes lines\") are drawn at ``x = 0`` and ``y = 0``, and have arrows at\ntheir ends.\n"
1919
]
2020
},
2121
{

_downloads/0388069c25c84d6bc3a8b03a4f424035/fancyarrow_demo.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"cell_type": "markdown",
1616
"metadata": {},
1717
"source": [
18-
"\n# Fancyarrow Demo\n\n"
18+
"\n# Fancyarrow Demo\n"
1919
]
2020
},
2121
{
@@ -33,7 +33,7 @@
3333
"cell_type": "markdown",
3434
"metadata": {},
3535
"source": [
36-
"------------\n\nReferences\n\"\"\"\"\"\"\"\"\"\"\n\nThe use of the following functions, methods, classes and modules is shown\nin this example:\n\n"
36+
"------------\n\n## References\n\nThe use of the following functions, methods, classes and modules is shown\nin this example:\n\n"
3737
]
3838
},
3939
{

_downloads/038e6d6e6393de9f0a88a65dd2e8fc4b/wire3d_animation_sgskip.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"cell_type": "markdown",
1616
"metadata": {},
1717
"source": [
18-
"\n# Rotating 3D wireframe plot\n\n\nA very simple 'animation' of a 3D plot. See also rotate_axes3d_demo.\n\n(This example is skipped when building the documentation gallery because it\nintentionally takes a long time to run)\n"
18+
"\n# Rotating 3D wireframe plot\n\nA very simple 'animation' of a 3D plot. See also rotate_axes3d_demo.\n\n(This example is skipped when building the documentation gallery because it\nintentionally takes a long time to run)\n"
1919
]
2020
},
2121
{

_downloads/03a4ae19b81e22290c46a94bdf82cb9a/mandelbrot.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"cell_type": "markdown",
1616
"metadata": {},
1717
"source": [
18-
"\n===================================\nShaded & power normalized rendering\n===================================\n\nThe Mandelbrot set rendering can be improved by using a normalized recount\nassociated with a power normalized colormap (gamma=0.3). Rendering can be\nfurther enhanced thanks to shading.\n\nThe ``maxiter`` gives the precision of the computation. ``maxiter=200`` should\ntake a few seconds on most modern laptops.\n"
18+
"\n# Shaded & power normalized rendering\n\nThe Mandelbrot set rendering can be improved by using a normalized recount\nassociated with a power normalized colormap (gamma=0.3). Rendering can be\nfurther enhanced thanks to shading.\n\nThe ``maxiter`` gives the precision of the computation. ``maxiter=200`` should\ntake a few seconds on most modern laptops.\n"
1919
]
2020
},
2121
{

_downloads/03ed879008811eb700082f93269e95f9/scatter3d.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"cell_type": "markdown",
1616
"metadata": {},
1717
"source": [
18-
"\n# 3D scatterplot\n\n\nDemonstration of a basic scatterplot in 3D.\n"
18+
"\n# 3D scatterplot\n\nDemonstration of a basic scatterplot in 3D.\n"
1919
]
2020
},
2121
{

0 commit comments

Comments
 (0)