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

Skip to content

Commit 6461814

Browse files
committed
Merge remote-tracking branch 'matplotlib/v2.x' into mergev2.xmaster
2 parents 1bc63cc + 9e1668b commit 6461814

18 files changed

+1290
-257
lines changed

LICENSE/LICENSE

Lines changed: 62 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,55 @@
1-
LICENSE AGREEMENT FOR MATPLOTLIB 1.2.0
2-
--------------------------------------
1+
License agreement for matplotlib versions 1.3.0 and later
2+
=========================================================
3+
4+
1. This LICENSE AGREEMENT is between the Matplotlib Development Team
5+
("MDT"), and the Individual or Organization ("Licensee") accessing and
6+
otherwise using matplotlib software in source or binary form and its
7+
associated documentation.
8+
9+
2. Subject to the terms and conditions of this License Agreement, MDT
10+
hereby grants Licensee a nonexclusive, royalty-free, world-wide license
11+
to reproduce, analyze, test, perform and/or display publicly, prepare
12+
derivative works, distribute, and otherwise use matplotlib
13+
alone or in any derivative version, provided, however, that MDT's
14+
License Agreement and MDT's notice of copyright, i.e., "Copyright (c)
15+
2012- Matplotlib Development Team; All Rights Reserved" are retained in
16+
matplotlib alone or in any derivative version prepared by
17+
Licensee.
18+
19+
3. In the event Licensee prepares a derivative work that is based on or
20+
incorporates matplotlib or any part thereof, and wants to
21+
make the derivative work available to others as provided herein, then
22+
Licensee hereby agrees to include in any such work a brief summary of
23+
the changes made to matplotlib .
24+
25+
4. MDT is making matplotlib available to Licensee on an "AS
26+
IS" basis. MDT MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
27+
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, MDT MAKES NO AND
28+
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
29+
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB
30+
WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
31+
32+
5. MDT SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF MATPLOTLIB
33+
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR
34+
LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING
35+
MATPLOTLIB , OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF
36+
THE POSSIBILITY THEREOF.
37+
38+
6. This License Agreement will automatically terminate upon a material
39+
breach of its terms and conditions.
40+
41+
7. Nothing in this License Agreement shall be deemed to create any
42+
relationship of agency, partnership, or joint venture between MDT and
43+
Licensee. This License Agreement does not grant permission to use MDT
44+
trademarks or trade name in a trademark sense to endorse or promote
45+
products or services of Licensee, or any third party.
46+
47+
8. By copying, installing or otherwise using matplotlib ,
48+
Licensee agrees to be bound by the terms and conditions of this License
49+
Agreement.
50+
51+
License agreement for matplotlib versions prior to 1.3.0
52+
========================================================
353

454
1. This LICENSE AGREEMENT is between John D. Hunter ("JDH"), and the
555
Individual or Organization ("Licensee") accessing and otherwise using
@@ -9,30 +59,30 @@ documentation.
959
2. Subject to the terms and conditions of this License Agreement, JDH
1060
hereby grants Licensee a nonexclusive, royalty-free, world-wide license
1161
to reproduce, analyze, test, perform and/or display publicly, prepare
12-
derivative works, distribute, and otherwise use matplotlib 1.2.0
62+
derivative works, distribute, and otherwise use matplotlib
1363
alone or in any derivative version, provided, however, that JDH's
1464
License Agreement and JDH's notice of copyright, i.e., "Copyright (c)
1565
2002-2011 John D. Hunter; All Rights Reserved" are retained in
16-
matplotlib 1.2.0 alone or in any derivative version prepared by
66+
matplotlib alone or in any derivative version prepared by
1767
Licensee.
1868

1969
3. In the event Licensee prepares a derivative work that is based on or
20-
incorporates matplotlib 1.2.0 or any part thereof, and wants to
70+
incorporates matplotlib or any part thereof, and wants to
2171
make the derivative work available to others as provided herein, then
2272
Licensee hereby agrees to include in any such work a brief summary of
23-
the changes made to matplotlib 1.2.0.
73+
the changes made to matplotlib.
2474

25-
4. JDH is making matplotlib 1.2.0 available to Licensee on an "AS
75+
4. JDH is making matplotlib available to Licensee on an "AS
2676
IS" basis. JDH MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
2777
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, JDH MAKES NO AND
2878
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
29-
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB 1.2.0
79+
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB
3080
WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
3181

3282
5. JDH SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF MATPLOTLIB
33-
1.2.0 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR
83+
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR
3484
LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING
35-
MATPLOTLIB 1.2.0, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF
85+
MATPLOTLIB , OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF
3686
THE POSSIBILITY THEREOF.
3787

3888
6. This License Agreement will automatically terminate upon a material
@@ -44,6 +94,6 @@ Licensee. This License Agreement does not grant permission to use JDH
4494
trademarks or trade name in a trademark sense to endorse or promote
4595
products or services of Licensee, or any third party.
4696

47-
8. By copying, installing or otherwise using matplotlib 1.2.0,
97+
8. By copying, installing or otherwise using matplotlib,
4898
Licensee agrees to be bound by the terms and conditions of this License
49-
Agreement.
99+
Agreement.

doc/_templates/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ <h1>Open source</h1>
192192

193193
<p>
194194
Please
195-
consider <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=X9T4KLZT2794S">donating
195+
consider <a href="https://www.flipcause.com/widget/MjI1OA==">donating
196196
to the matplotlib project</a> through the Numfocus organization or to
197197
the <a href="http://numfocus.org/johnhunter/">John Hunter Technology Fellowship</a>.
198198
</p>

doc/pyplots/make.py

Lines changed: 0 additions & 75 deletions
This file was deleted.

doc/pyplots/plotmap.hires.png

-674 KB
Binary file not shown.

doc/pyplots/plotmap.pdf

-1.73 MB
Binary file not shown.

doc/pyplots/plotmap.png

-241 KB
Binary file not shown.

doc/pyplots/tex_demo.hires.png

-52.9 KB
Binary file not shown.

doc/pyplots/tex_demo.pdf

-311 KB
Binary file not shown.
-52.9 KB
Binary file not shown.

doc/pyplots/tex_unicode_demo.pdf

-570 Bytes
Binary file not shown.

doc/pyplots/tex_unicode_demo.png

-21.9 KB
Binary file not shown.

doc/users/beginner.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ Beginner's Guide
2020
legend_guide.rst
2121
annotations_guide.rst
2222
screenshots.rst
23+
colors.rst
2324
colormaps.rst
2425
colormapnorms.rst
25-
26-
27-

doc/users/colors.rst

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
.. _colors:
2+
3+
*****************
4+
Specifying Colors
5+
*****************
6+
7+
In almost all places in matplotlib where a color can be specified by the user it can be provided as:
8+
9+
* ``(r, g, b)`` tuples
10+
* ``(r, g, b, a)`` tuples
11+
* hex string, ex ``#OFOFOF``
12+
* float value between [0, 1] for gray level
13+
* One of ``{'b', 'g', 'r', 'c', 'm', 'y', 'k', 'w'}``
14+
* valid css4/X11 color names
15+
* valid name from the `XKCD color survey
16+
<http://blog.xkcd.com/2010/05/03/color-survey-results/>`__ These
17+
names are available both with and with out spaces. In the case of name clashes
18+
the css/X11 names have priority. To ensure colors
19+
from the XKCD mapping are used prefix the space-less name with
20+
``'XKCD'``.
21+
22+
All string specifications of color are case-insensitive.
23+
24+
Internally, mpl is moving to storing all colors as RGBA float quadruples.
25+
26+
Name clash between CSS4/X11 and XKCD
27+
------------------------------------
28+
29+
The color names in the XKCD survey include spaces (unlike css4/X11
30+
names). Matplotlib exposes all of the XKCD colors both with and
31+
without spaces.
32+
33+
There are 95 (out of 148 colors in the css color list) conflicts
34+
between the css4/X11 names and the XKCD names. Given that these are
35+
the standard color names of the web, matplotlib should follow these
36+
conventions. To accesses the XKCD colors which are shadowed by css4,
37+
prefix the colorname with ``'XKCD'``, for example ``'blue'`` maps to
38+
``'#0000FF'`` where as ``'XKCDblue'`` maps to ``'#0343DF'``.
39+
40+
.. plot::
41+
42+
import matplotlib.pyplot as plt
43+
import matplotlib._color_data as mcd
44+
45+
import matplotlib.patches as mpatch
46+
overlap = (set(mcd.CSS4_COLORS) & set(mcd.XKCD_COLORS))
47+
48+
fig = plt.figure(figsize=[4.8, 16])
49+
ax = fig.add_axes([0, 0, 1, 1])
50+
51+
j = 0
52+
53+
for n in sorted(overlap, reverse=True):
54+
cn = mcd.CSS4_COLORS[n]
55+
xkcd = mcd.XKCD_COLORS[n].upper()
56+
if cn != xkcd:
57+
print (n, cn, xkcd)
58+
59+
r1 = mpatch.Rectangle((0, j), 1, 1, color=cn)
60+
r2 = mpatch.Rectangle((1, j), 1, 1, color=xkcd)
61+
txt = ax.text(2, j+.5, ' ' + n, va='center', fontsize=10)
62+
ax.add_patch(r1)
63+
ax.add_patch(r2)
64+
ax.axhline(j, color='k')
65+
j += 1
66+
67+
ax.text(.5, j+.1, 'X11', ha='center')
68+
ax.text(1.5, j+.1, 'XKCD', ha='center')
69+
ax.set_xlim(0, 3)
70+
ax.set_ylim(0, j + 1)
71+
ax.axis('off')

doc/users/index.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,8 @@ User's Guide
1616
configuration.rst
1717
beginner.rst
1818
developer.rst
19+
colors.rst
1920
whats_new.rst
2021
github_stats.rst
2122
license.rst
2223
credits.rst
23-
24-
25-
26-

0 commit comments

Comments
 (0)