Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 26c14a3

Browse files
committed
Merge remote-tracking branch 'matplotlib/v2.1.0-doc' into v2.1.x
2 parents 83547cb + 2d7fa01 commit 26c14a3

30 files changed

+99
-87
lines changed

.appveyor.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,12 @@ install:
8585
# same things as the requirements in ci/conda_recipe/meta.yaml
8686
# if conda-forge gets a new pyqt, it might be nice to install it as well to have more backends
8787
# https://github.com/conda-forge/conda-forge.github.io/issues/157#issuecomment-223536381
88+
#
89+
# n.b. pandas is pinned to <0.21 due to issue 9610
8890
- conda create -q -n test-environment python=%PYTHON_VERSION%
8991
pip setuptools numpy python-dateutil freetype=2.6 msinttypes "tk=8.5"
9092
pyparsing pytz tornado "libpng>=1.6.21,<1.7" "zlib=1.2" "cycler>=0.10"
91-
mock sphinx pandas
93+
mock sphinx "pandas<0.21.0"
9294
- activate test-environment
9395
- echo %PYTHON_VERSION% %TARGET_ARCH%
9496
- if %PYTHON_VERSION% == 2.7 conda install -q backports.functools_lru_cache

doc/_static/mpl-scatter-density.png

152 KB
Loading

doc/devel/contributing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ We use `Git <https://git-scm.com/>`_ for version control and
7979
You can check out the latest sources with the command (see
8080
:ref:`set-up-fork` for more details)::
8181

82-
git clone https://github.com:matplotlib/matplotlib.git
82+
git clone https://github.com/matplotlib/matplotlib.git
8383

8484
and navigate to the :file:`matplotlib` directory. If you have the proper privileges,
8585
you can use ``git@`` instead of ``https://``, which works through the ssh protocol
@@ -180,7 +180,7 @@ then submit a "pull request" (PR):
180180

181181
3. Clone this copy to your local disk::
182182

183-
$ git clone https://github.com:YourLogin/matplotlib.git
183+
$ git clone https://github.com/YourLogin/matplotlib.git
184184

185185
4. Create a branch to hold your changes::
186186

doc/devel/gitwash/development_workflow.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ collaborator:
208208

209209
Now all those people can do::
210210

211-
git clone https://gith hub.com:your-user-name/matplotlib.git
211+
git clone https://github.com/your-user-name/matplotlib.git
212212

213213
Remember that links starting with ``https`` or ``git@`` are read-write, and that
214214
``git@`` uses the ssh protocol; links starting with ``git://`` are read-only.

doc/devel/gitwash/set_up_fork.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Overview
1313

1414
::
1515

16-
git clone https://github.com:your-user-name/matplotlib.git
16+
git clone https://github.com/your-user-name/matplotlib.git
1717
cd matplotlib
1818
git remote add upstream git://github.com/matplotlib/matplotlib.git
1919

@@ -24,7 +24,7 @@ Clone your fork
2424
---------------
2525

2626
#. Clone your fork to the local computer with ``git clone
27-
https://github.com:your-user-name/matplotlib.git``
27+
https://github.com/your-user-name/matplotlib.git``
2828
#. Investigate. Change directory to your new repo: ``cd matplotlib``. Then
2929
``git branch -a`` to show you all branches. You'll get something
3030
like:
@@ -67,7 +67,7 @@ Just for your own satisfaction, show yourself that you now have a new
6767
6868
upstream git://github.com/matplotlib/matplotlib.git (fetch)
6969
upstream git://github.com/matplotlib/matplotlib.git (push)
70-
origin https://github.com:your-user-name/matplotlib.git (fetch)
71-
origin https://github.com:your-user-name/matplotlib.git (push)
70+
origin https://github.com/your-user-name/matplotlib.git (fetch)
71+
origin https://github.com/your-user-name/matplotlib.git (push)
7272
7373
.. include:: links.inc

doc/thirdpartypackages/index.rst

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ widgets for parameter exploration.
6161
Specialty plots
6262
***************
6363

64+
DeCiDa
65+
======
66+
67+
`DeCiDa <https://pypi.python.org/pypi/DeCiDa>`_ is a library of functions
68+
and classes for electron device characterization, electronic circuit design and
69+
general data visualization and analysis.
70+
6471
Matplotlib-Venn
6572
===============
6673
`Matplotlib-Venn <https://github.com/konstantint/matplotlib-venn>`_ provides a
@@ -76,6 +83,21 @@ via e.g., ``ax.set_xscale('prob')`` or ``plt.yscale('prob')``.
7683

7784
.. image:: /_static/probscale_demo.png
7885

86+
mpl-scatter-density
87+
===================
88+
89+
`mpl-scatter-density <https://github.com/astrofrog/mpl-scatter-density>`_ is a
90+
small package that makes it easy to make scatter plots of large numbers
91+
of points using a density map. The following example contains around 13 million
92+
points and the plotting (excluding reading in the data) took less than a
93+
second on an average laptop:
94+
95+
.. image:: /_static/mpl-scatter-density.png
96+
:height: 400px
97+
98+
When used in interactive mode, the density map is downsampled on-the-fly while
99+
panning/zooming in order to provide a smooth interactive experience.
100+
79101
mplstereonet
80102
============
81103
`mplstereonet <https://github.com/joferkington/mplstereonet>`_ provides
@@ -108,13 +130,6 @@ Windrose
108130
Numpy library to manage wind data, draw windroses (also known as polar rose
109131
plots), draw probability density functions and fit Weibull distributions.
110132

111-
DeCiDa
112-
======
113-
114-
`DeCiDa <https://pypi.python.org/pypi/DeCiDa>`_ is a library of functions
115-
and classes for electron device characterization, electronic circuit design and
116-
general data visualization and analysis.
117-
118133
Interactivity
119134
*************
120135

doc/users/intro.rst renamed to doc/users/history.rst

Lines changed: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
Introduction
2-
============
1+
History
2+
=======
3+
4+
.. note::
5+
6+
The following introductory text was written in 2008 by John D. Hunter
7+
(1968-2012), the original author of Matplotlib.
38

49
Matplotlib is a library for making 2D plots of arrays in `Python
510
<https://www.python.org>`_. Although it has its origins in emulating
6-
the MATLAB |reg| [#]_ graphics commands, it is
11+
the MATLAB graphics commands, it is
712
independent of MATLAB, and can be used in a Pythonic, object oriented
813
way. Although Matplotlib is written primarily in pure Python, it
914
makes heavy use of `NumPy <http://www.numpy.org>`_ and other extension
1015
code to provide good performance even for large arrays.
1116

12-
.. |reg| unicode:: 0xAE
13-
:ltrim:
14-
1517
Matplotlib is designed with the philosophy that you should be able to
1618
create simple plots with just a few commands, or just one! If you
1719
want to see a histogram of your data, you shouldn't need to
@@ -62,10 +64,10 @@ The Matplotlib code is conceptually divided into three parts: the
6264
*pylab interface* is the set of functions provided by
6365
:mod:`matplotlib.pylab` which allow the user to create plots with code
6466
quite similar to MATLAB figure generating code
65-
(:ref:`sphx_glr_tutorials_introductory_pyplot.py`). The *Matplotlib frontend* or *Matplotlib
67+
(:doc:`/tutorials/introductory/pyplot`). The *Matplotlib frontend* or *Matplotlib
6668
API* is the set of classes that do the heavy lifting, creating and
6769
managing figures, text, lines, plots and so on
68-
(:ref:`sphx_glr_tutorials_intermediate_artists.py`). This is an abstract interface that knows
70+
(:doc:`/tutorials/intermediate/artists`). This is an abstract interface that knows
6971
nothing about output. The *backends* are device-dependent drawing
7072
devices, aka renderers, that transform the frontend representation to
7173
hardcopy or a display device (:ref:`what-is-a-backend`). Example
@@ -87,8 +89,39 @@ people want to automatically generate PostScript files to send
8789
to a printer or publishers. Others deploy Matplotlib on a web
8890
application server to generate PNG output for inclusion in
8991
dynamically-generated web pages. Some use Matplotlib interactively
90-
from the Python shell in Tkinter on Windows. My primary use is to
92+
from the Python shell in Tkinter on Windows. My primary use is to
9193
embed Matplotlib in a Gtk+ EEG application that runs on Windows, Linux
9294
and Macintosh OS X.
9395

94-
.. [#] MATLAB is a registered trademark of The MathWorks, Inc.
96+
----
97+
98+
Matplotlib's original logo (2003 -- 2008).
99+
100+
..
101+
The original logo was added in fc8c215.
102+
103+
.. plot::
104+
105+
from matplotlib import cbook, pyplot as plt, style
106+
import numpy as np
107+
108+
style.use("classic")
109+
110+
datafile = cbook.get_sample_data('membrane.dat', asfileobj=False)
111+
112+
# convert data to mV
113+
x = 1000 * 0.1 * np.fromstring(open(datafile, 'rb').read(), np.float32)
114+
# 0.0005 is the sample interval
115+
t = 0.0005 * np.arange(len(x))
116+
plt.figure(1, figsize=(7, 1), dpi=100)
117+
ax = plt.subplot(111, facecolor='y')
118+
plt.plot(t, x)
119+
plt.text(0.5, 0.5, 'matplotlib', color='r',
120+
fontsize=40, fontname=['Courier', 'DejaVu Sans Mono'],
121+
horizontalalignment='center',
122+
verticalalignment='center',
123+
transform=ax.transAxes,
124+
)
125+
plt.axis([1, 1.72, -60, 10])
126+
plt.gca().set_xticklabels([])
127+
plt.gca().set_yticklabels([])

doc/users/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ User's Guide
1212
.. toctree::
1313
:maxdepth: 2
1414

15-
intro.rst
15+
history.rst
1616
installing.rst
1717
../tutorials/index.rst
1818
interactive.rst

examples/animation/animate_decay.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Decay
44
=====
55
6-
This example showcases a sinusoidal decay animation.
6+
A sinusoidal decay animation.
77
"""
88

99

examples/animation/basic_example.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Simple animation examples
44
=========================
55
6-
This example contains two animations. The first is a random walk plot. The
7-
second is an image animation.
6+
Two animations where the first is a random walk plot and
7+
the second is an image animation.
88
"""
99

1010
import numpy as np

examples/animation/dynamic_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
An animated image
44
=================
55
6-
This example demonstrates how to animate an image.
6+
Animation of an image.
77
"""
88
import numpy as np
99
import matplotlib.pyplot as plt

examples/animation/dynamic_image2.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
An animated image using a list of images
44
========================================
55
6-
This examples demonstrates how to animate an image from a list of images (or
7-
Artists).
6+
Animate an image from a list of images (or Artists).
87
"""
98
import numpy as np
109
import matplotlib.pyplot as plt

examples/animation/image_slices_viewer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Image Slices Viewer
44
===================
55
6-
This example demonstrates how to scroll through 2D image slices of a 3D array.
6+
Scroll through 2D image slices of a 3D array.
77
"""
88
from __future__ import print_function
99

examples/animation/moviewriter_sgskip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
MovieWriter
44
===========
55
6-
This example uses a MovieWriter directly to grab individual frames and write
6+
Use a MovieWriter directly to grab individual frames and write
77
them to a file. This avoids any event loop integration, but has the advantage
88
of working with even the Agg backend. This is not recommended for use in an
99
interactive setting.

examples/animation/simple_3danim.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
3D animation
44
============
55
6-
A simple example of an animated plot... In 3D!
6+
An animated plot in 3D.
77
"""
88
import numpy as np
99
import matplotlib.pyplot as plt

examples/api/agg_oo_sgskip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
fig = Figure()
1313
# A canvas must be manually attached to the figure (pyplot would automatically
14-
# do it). This is done by instanciating the canvas with the figure as
14+
# do it). This is done by instantiating the canvas with the figure as
1515
# argument.
1616
FigureCanvas(fig)
1717
ax = fig.add_subplot(111)

examples/api/colorbar_basics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Colorbar
44
========
55
6-
This example shows how to use colorbar by specifying the mappable object (here
6+
Use colorbar by specifying the mappable object (here
77
the imshow returned object) and the axes to attach the colorbar to.
88
"""
99

examples/api/custom_projection_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Custom projection
44
=================
55
6-
This example showcases the Hammer projection by alleviating many features of
6+
Showcase Hammer projection by alleviating many features of
77
matplotlib.
88
"""
99

examples/api/custom_scale_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Custom scale
44
============
55
6-
This example showcases how to create a custom scale, by implementing the
6+
Create a custom scale, by implementing the
77
scaling use for latitude data in a Mercator Projection.
88
"""
99

examples/api/donut.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Mmh Donuts!!!
44
=============
55
6-
This example draws donuts (miam!) using Path and Patches.
6+
Draw donuts (miam!) using Path and Patches.
77
"""
88

99
import numpy as np

examples/api/engineering_formatter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Labeling ticks using engineering notation
44
=========================================
55
6-
Demo to show use of the engineering Formatter.
6+
Use of the engineering Formatter.
77
'''
88

99
import matplotlib.pyplot as plt

examples/api/filled_step.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
Hatch-filled histograms
44
=========================
55
6-
This example showcases the hatching capabilities of matplotlib by plotting
7-
various histograms.
6+
Hatching capabilities for plotting histograms.
87
"""
98

109
import itertools

examples/api/histogram_path.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Building histograms using Rectangles and PolyCollections
44
========================================================
55
6-
This example shows how to use a path patch to draw a bunch of
7-
rectangles. The technique of using lots of Rectangle instances, or
6+
Using a path patch to draw rectangles.
7+
The technique of using lots of Rectangle instances, or
88
the faster method of using PolyCollections, were implemented before we
99
had proper paths with moveto/lineto, closepoly etc in mpl. Now that
1010
we have them, we can draw collections of regularly shaped objects with

examples/api/image_zcoord.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Modifying the coordinate formatter
44
==================================
55
6-
Show how to modify the coordinate formatter to report the image "z"
6+
Modify the coordinate formatter to report the image "z"
77
value of the nearest pixel given x and y
88
"""
99
import numpy as np

examples/api/joinstyle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Join styles
44
===========
55
6-
Illustrate the three different join styles
6+
Illustrate the three different join styles.
77
"""
88

99
import numpy as np

examples/api/legend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Legend using pre-defined labels
44
===============================
55
6-
Notice how the legend labels are defined with the plots!
6+
Defining legend labels with plots.
77
"""
88

99

examples/api/line_with_text.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Artist within an artist
44
=======================
55
6-
Show how to override basic methods so an artist can contain another
6+
Override basic methods so an artist can contain another
77
artist. In this case, the line contains a Text instance to label it.
88
"""
99
import numpy as np

examples/api/mathtext_asarray.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
A mathtext image as numpy array
44
===============================
55
6-
This example shows how to make images from LaTeX strings.
6+
Make images from LaTeX strings.
77
"""
88

99
import matplotlib.mathtext as mathtext

0 commit comments

Comments
 (0)