8000 Merge v2.x into master by jenshnielsen · Pull Request #6246 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Merge v2.x into master #6246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Mar 30, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
605a8af
ENH: add XKCD colorname -> hex mapping
tacaswell Dec 31, 2015
010be02
MNT: normalize X11/CSS/HTML colors
tacaswell Jan 2, 2016
e392d03
MNT: normalize to use un-spaced names in XKCD map
tacaswell Jan 2, 2016
e049a49
MNT: unify string handling
tacaswell Jan 2, 2016
bda202b
MNT: always validate alpha as [0, 1] or None
tacaswell Jan 2, 2016
b2543f6
MNT: add xkcd prefix + switch priority order
tacaswell Jan 5, 2016
9feeb9e
FIX: restore single character colors to rgb tuples
tacaswell Jan 18, 2016
3d4a517
DOC: remove last paypal link
tacaswell Feb 8, 2016
b93bd5d
WIP color docs
tacaswell Feb 14, 2016
db5ef16
Update LICENSE file to match doc/users/license.rst
mdboom Mar 2, 2016
80a8e53
DOC: remove static images
tacaswell Feb 8, 2016
f3d4415
DOC/MNT: remove unused/outdate files
tacaswell Mar 7, 2016
9963cca
FIX: use lowercase in map
tacaswell Mar 7, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 62 additions & 12 deletions LICENSE/LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,55 @@
LICENSE AGREEMENT FOR MATPLOTLIB 1.2.0
--------------------------------------
License agreement for matplotlib versions 1.3.0 and later
=========================================================

1. This LICENSE AGREEMENT is between the Matplotlib Development Team
("MDT"), and the Individual or Organization ("Licensee") accessing and
otherwise using matplotlib software in source or binary form and its
associated documentation.

2. Subject to the terms and conditions of this License Agreement, MDT
hereby grants Licensee a nonexclusive, royalty-free, world-wide license
to reproduce, analyze, test, perform and/or display publicly, prepare
derivative works, distribute, and otherwise use matplotlib
alone or in any derivative version, provided, however, that MDT's
License Agreement and MDT's notice of copyright, i.e., "Copyright (c)
2012- Matplotlib Development Team; All Rights Reserved" are retained in
matplotlib alone or in any derivative version prepared by
Licensee.

3. In the event Licensee prepares a derivative work that is based on or
incorporates matplotlib or any part thereof, and wants to
make the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to matplotlib .

4. MDT is making matplotlib available to Licensee on an "AS
IS" basis. MDT MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, MDT MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB
WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.

5. MDT SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF MATPLOTLIB
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR
LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING
MATPLOTLIB , OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF
THE POSSIBILITY THEREOF.

6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.

7. Nothing in this License Agreement shall be deemed to create any
relationship of agency, partnership, or joint venture between MDT and
Licensee. This License Agreement does not grant permission to use MDT
trademarks or trade name in a trademark sense to endorse or promote
products or services of Licensee, or any third party.

8. By copying, installing or otherwise using matplotlib ,
Licensee agrees to be bound by the terms and conditions of this License
Agreement.

License agreement for matplotlib versions prior to 1.3.0
========================================================

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

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

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

5. JDH SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF MATPLOTLIB
1.2.0 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR
LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING
MATPLOTLIB 1.2.0, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF
MATPLOTLIB , OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF
THE POSSIBILITY THEREOF.

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

8. By copying, installing or otherwise using matplotlib 1.2.0,
8. By copying, installing or otherwise using matplotlib,
Licensee agrees to be bound by the terms and conditions of this License
Agreement.
Agreement.
2 changes: 1 addition & 1 deletion doc/_templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ <h1>Open source</h1>

<p>
Please
consider <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=X9T4KLZT2794S">donating
consider <a href="https://www.flipcause.com/widget/MjI1OA==">donating
to the matplotlib project</a> through the Numfocus organization or to
the <a href="http://numfocus.org/johnhunter/">John Hunter Technology Fellowship</a>.
</p>
Expand Down
75 changes: 0 additions & 75 deletions doc/pyplots/make.py

This file was deleted.

Binary file removed doc/pyplots/plotmap.hires.png
Binary file not shown.
Binary file removed doc/pyplots/plotmap.pdf
Binary file not shown.
Binary file removed doc/pyplots/plotmap.png
Binary file not shown.
Binary file removed doc/pyplots/tex_demo.hires.png
Binary file not shown.
Binary file removed doc/pyplots/tex_demo.pdf
Binary file not shown.
Binary file removed doc/pyplots/tex_unicode_demo.hires.png
Binary file not shown.
Binary file removed doc/pyplots/tex_unicode_demo.pdf
Binary file not shown.
Binary file removed doc/pyplots/tex_unicode_demo.png
Binary file not shown.
4 changes: 1 addition & 3 deletions doc/users/beginner.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ Beginner's Guide
legend_guide.rst
annotations_guide.rst
screenshots.rst
colors.rst
colormaps.rst
colormapnorms.rst



71 changes: 71 additions & 0 deletions doc/users/colors.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
.. _colors:

*****************
Specifying Colors
*****************

In almost all places in matplotlib where a color can be specified by the user it can be provided as:

* ``(r, g, b)`` tuples
* ``(r, g, b, a)`` tuples
* hex string, ex ``#OFOFOF``
* float value between [0, 1] for gray level
* One of ``{'b', 'g', 'r', 'c', 'm', 'y', 'k', 'w'}``
* valid css4/X11 color names
* valid name from the `XKCD color survey
<http://blog.xkcd.com/2010/05/03/color-survey-results/>`__ These
names are available both with and with out spaces. In the case of name clashes
the css/X11 names have priority. To ensure colors
from the XKCD mapping are used prefix the space-less name with
``'XKCD'``.

All string specifications of color are case-insensitive.

Internally, mpl is moving to storing all colors as RGBA float quadruples.

Name clash between CSS4/X11 and XKCD
------------------------------------

The color names in the XKCD survey include spaces (unlike css4/X11
names). Matplotlib exposes all of the XKCD colors both with and
without spaces.

There are 95 (out of 148 colors in the css color list) conflicts
between the css4/X11 names and the XKCD names. Given that these are
the standard color names of the web, matplotlib should follow these
conventions. To accesses the XKCD colors which are shadowed by css4,
prefix the colorname with ``'XKCD'``, for example ``'blue'`` maps to
``'#0000FF'`` where as ``'XKCDblue'`` maps to ``'#0343DF'``.

.. plot::

import matplotlib.pyplot as plt
import matplotlib._color_data as mcd

import matplotlib.patches as mpatch
overlap = (set(mcd.CSS4_COLORS) & set(mcd.XKCD_COLORS))

fig = plt.figure(figsize=[4.8, 16])
ax = fig.add_axes([0, 0, 1, 1])

j = 0

for n in sorted(overlap, reverse=True):
cn = mcd.CSS4_COLORS[n]
xkcd = mcd.XKCD_COLORS[n].upper()
if cn != xkcd:
print (n, cn, xkcd)

r1 = mpatch.Rectangle((0, j), 1, 1, color=cn)
r2 = mpatch.Rectangle((1, j), 1, 1, color=xkcd)
txt = ax.text(2, j+.5, ' ' + n, va='center', fontsize=10)
ax.add_patch(r1)
ax.add_patch(r2)
ax.axhline(j, color='k')
j += 1

ax.text(.5, j+.1, 'X11', ha='center')
ax.text(1.5, j+.1, 'XKCD', ha='center')
ax.set_xlim(0, 3)
ax.set_ylim(0, j + 1)
ax.axis('off')
5 changes: 1 addition & 4 deletions doc/users/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@ User's Guide
configuration.rst
beginner.rst
developer.rst
colors.rst
whats_new.rst
github_stats.rst
license.rst
credits.rst




Loading
0