Skip to content

Commit ce2da6b

Browse files
committed
Merge remote-tracking branch 'upstream/v1.2.x'
Conflicts: lib/matplotlib/axes.py
2 parents 22af264 + 51ac36b commit ce2da6b

16 files changed

+2328
-104
lines changed

doc/_templates/index.html

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,6 @@
33

44

55
{% block body %}
6-
<script>
7-
function getSnippet(id, url) {
8-
var req = false;
9-
// For Safari, Firefox, and other non-MS browsers
10-
if (window.XMLHttpRequest) {
11-
try {
12-
req = new XMLHttpRequest();
13-
} catch (e) {
14-
req = false;
15-
}
16-
} else if (window.ActiveXObject) {
17-
// For Internet Explorer on Windows
18-
try {
19-
req = new ActiveXObject("Msxml2.XMLHTTP");
20-
} catch (e) {
21-
try {
22-
req = new ActiveXObject("Microsoft.XMLHTTP");
23-
} catch (e) {
24-
req = false;
25-
}
26-
}
27-
}
28-
var element = document.getElementById(id);
29-
if (req) {
30-
// Synchronous request, wait till we have it all
31-
req.open('GET', url, false);
32-
req.send(null);
33-
element.innerHTML = req.responseText;
34-
}
35-
}
36-
</script>
37-
386

397
<h1>John Hunter (1968-2012)</h1>
408

@@ -100,8 +68,9 @@ <h1>Introduction</h1>
10068

10169
<h1>Download</h1>
10270

103-
Matplotlib is available for
104-
<a href="https://github.com/matplotlib/matplotlib/downloads">download</a>.
71+
Visit the
72+
<a href="http://matplotlib.org/downloads.html">matplotlib downloads
73+
page</a>.
10574

10675
<h1>Documentation</h1>
10776

doc/_templates/layout.html

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,40 @@
11
{% extends "!layout.html" %}
22

3+
<script>
4+
function getSnippet(id, url) {
5+
var req = false;
6+
// For Safari, Firefox, and other non-MS browsers
7+
if (window.XMLHttpRequest) {
8+
try {
9+
req = new XMLHttpRequest();
10+
} catch (e) {
11+
req = false;
12+
}
13+
} else if (window.ActiveXObject) {
14+
// For Internet Explorer on Windows
15+
try {
16+
req = new ActiveXObject("Msxml2.XMLHTTP");
17+
} catch (e) {
18+
try {
19+
req = new ActiveXObject("Microsoft.XMLHTTP");
20+
} catch (e) {
21+
req = false;
22+
}
23+
}
24+
}
25+
var element = document.getElementById(id);
26+
if (req) {
27+
// Synchronous request, wait till we have it all
28+
req.open('GET', url, false);
29+
req.send(null);
30+
element.innerHTML = req.responseText;
31+
}
32+
}
33+
</script>
334

435
{% block rootrellink %}
536
<li><a href="{{ pathto('index') }}">home</a>|&nbsp;</li>
37+
<li><a href="http://www.matplotlib.org/downloads.html">downloads</a>|&nbsp;</li>
638
<li><a href="{{ pathto('search') }}">search</a>|&nbsp;</li>
739
<li><a href="{{ pathto('examples/index') }}">examples</a>|&nbsp;</li>
840
<li><a href="{{ pathto('gallery') }}">gallery</a>|&nbsp;</li>
@@ -50,4 +82,3 @@
5082
{# put the sidebar before the body #}
5183
{% block sidebar1 %}{{ sidebar() }}{% endblock %}
5284
{% block sidebar2 %}{% endblock %}
53-

doc/devel/release_guide.rst

Lines changed: 114 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Doing a matplotlib release
55
*************************
66

7-
A guide for developers who are doing a matplotlib release
7+
A guide for developers who are doing a matplotlib release.
88

99
* Edit :file:`__init__.py` and bump the version number
1010

@@ -34,7 +34,8 @@ Branching
3434
=========
3535

3636
Once all the tests are passing and you are ready to do a release, you
37-
need to create a release branch::
37+
need to create a release branch. These only need to be created when
38+
the second part of the version number changes::
3839

3940
git checkout -b v1.1.x
4041
git push git@github.com:matplotlib/matplotlib.git v1.1.x
@@ -52,14 +53,14 @@ affiliate your name with it. A reasonable tag message would be something
5253
like ``v1.1.0 Release Candidate 1 (September 24, 2011)``. To tag a
5354
release after the fact, just track down the commit hash, and::
5455

55-
git tag -a v1.0.1 a9f3f3a50745
56+
git tag -a v1.0.1rc1 a9f3f3a50745
5657

5758
Tags allow developers to quickly checkout different releases by name,
5859
and also provides source download via zip and tarball on github.
5960

6061
Then push the tags to the main repository::
6162

62-
git push upstream v1.0.1
63+
git push upstream v1.0.1rc1
6364

6465
.. _release-packaging:
6566

@@ -80,7 +81,7 @@ Packaging
8081
after any changes to :file:`setup.cfg` before rebuilding since cruft
8182
in the :file:`build` dir can get carried along.
8283

83-
* on windows, unix2dos the rc file
84+
* On windows, unix2dos the rc file.
8485

8586
* We have a Makefile for the OS X builds in the mpl source dir
8687
:file:`release/osx`, so use this to prepare the OS X releases.
@@ -89,17 +90,92 @@ Packaging
8990
:file:`release/win32` which you can use this to prepare the windows
9091
releases.
9192

92-
.. _release-candidate-testing:
93+
Posting files
94+
=============
9395

94-
Release candidate testing
95-
=========================
96+
Our current method is for the release manager to collect all of the
97+
binaries from the platform builders and post the files online on
98+
Sourceforge. It is also possible that those building the binaries
99+
could upload to directly to Sourceforge.
96100

97-
Post the release candidates tarballs to the `matplotlib download page
98-
<https://github.com/matplotlib/matplotlib/downloads>`_. If you have
99-
developer rights, you should see an "Upload a new file" section
100-
there.
101+
There are many ways to upload files to Sourceforge (`scp`, `rsync`,
102+
`sftp`, and a web interface) described in `Sourceforge Release File
103+
System documentation
104+
<https://sourceforge.net/apps/trac/sourceforge/wiki/Release%20files%20for%20download>`_.
105+
Below, we will use `sftp`.
101106

102-
.. _release-announcing:
107+
1. Create a directory containing all of the release files and `cd` to it.
108+
109+
2. `sftp` to Sourceforge::
110+
111+
sftp USERNAME@frs.sourceforge.net:/home/frs/project/matplotlib/matplotlib
112+
113+
3. Make a new directory for the release and move to it::
114+
115+
mkdir matplotlib-1.1.0rc1
116+
cd matplotlib-1.1.0rc1
117+
118+
4. Upload all of the files in the current directory on your local machine::
119+
120+
put *
121+
122+
If this release is a final release, the default download for the
123+
matplotlib project should also be updated. Login to Sourceforge and
124+
visit the `matplotlib files page
125+
<https://sourceforge.net/projects/matplotlib/files/matplotlib/>`_.
126+
Navigate to the tarball of the release you just updated, click on
127+
"Details" icon (it looks like a lower case ``i``), and make it the
128+
default download for all platforms.
129+
130+
There is a list of direct links to downloads on matplotlib's main
131+
website. This needs to be manually generated and updated every time
132+
new files are posted.
133+
134+
1. Clone the matplotlib documentation repository and `cd` into it::
135+
136+
git clone git@github.com:matplotlib/matplotlib.github.com.git
137+
cd matplotlib.github.com
138+
139+
2. Update the list of downloads that you want to display by editing
140+
the `downloads.txt` file. Generally, this should contain the last two
141+
final releases and any active release candidates.
142+
143+
3. Update the downloads webpage by running the `update_downloads.py`
144+
script. This script requires `paramiko` (for `sftp` support) and
145+
`jinja2` for templating. Both of these dependencies can be
146+
installed using pip::
147+
148+
pip install paramiko
149+
pip install jinja2
150+
151+
Then update the download page::
152+
153+
./update_downloads.py
154+
155+
You will be prompted for your Sourceforge username and password.
156+
157+
4. Commit the changes and push them up to github::
158+
159+
git commit -m "Updating download list"
160+
git push
161+
162+
Update PyPI
163+
===========
164+
165+
Once the tarball has been posted on Sourceforge, you can register a
166+
link to the new release on PyPI. This should only be done with final
167+
(non-release-candidate) releases, since doing so will hide any
168+
available stable releases.
169+
170+
You may need to set up your `.pypirc` file as described in the
171+
`distutils register command documentation
172+
<http://docs.python.org/2/distutils/packageindex.html>`_.
173+
174+
Then updating the record on PyPI is as simple as::
175+
176+
python setup.py register
177+
178+
This will hide any previous releases automatically.
103179

104180
Documentation updates
105181
=====================
@@ -108,6 +184,27 @@ The built documentation exists in the `matplotlib.github.com
108184
<https://github.com/matplotlib/matplotlib.github.com/>`_ repository.
109185
Pushing changes to master automatically updates the website.
110186

187+
The documentation is organized by version. At the root of the tree is
188+
always the documentation for the latest stable release. Under that,
189+
there are directories containing the documentation for older versions
190+
as well as the bleeding edge release version called `dev` (usually
191+
based on what's on master in the github repository, but it may also
192+
temporarily be a staging area for proposed changes). There is also a
193+
symlink directory with the name of the most recently released version
194+
that points to the root. With each new release, these directories may
195+
need to be reorganized accordingly. Any time these version
196+
directories are added or removed, the `versions.html` file (which
197+
contains a list of the available documentation versions for the user)
198+
must also be updated.
199+
200+
To make sure everyone's hard work gets credited, regenerate the github
201+
stats. `cd` into the tools directory and run::
202+
203+
python github_stats.py $TAG > ../doc/users/github_stats.rst
204+
205+
where `$TAG` is the tag of the last major release. This will generate
206+
stats for all work done since that release.
207+
111208
In the matplotlib source repository, build the documentation::
112209

113210
cd doc
@@ -130,6 +227,7 @@ changes upstream::
130227
Announcing
131228
==========
132229

133-
Announce the release on matplotlib-announce, matplotlib-users and
134-
matplotlib-devel. Include a summary of highlights from the CHANGELOG
135-
and/or post the whole CHANGELOG since the last release.
230+
Announce the release on matplotlib-announce, matplotlib-users, and
231+
matplotlib-devel. Final (non-release-candidate) versions should also
232+
be announced on python-announce. Include a summary of highlights from
233+
the CHANGELOG and/or post the whole CHANGELOG since the last release.

doc/faq/installing_faq.rst

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -235,28 +235,6 @@ then you will need to set your PYTHONPATH, eg::
235235

236236
See also ref:`environment-variables`.
237237

238-
.. _easy-install-osx-egg:
239-
240-
easy_install from egg
241-
---------------------
242-
243-
You can also use the eggs we build for OSX (see the `installation
244-
instructions
245-
<http://pypi.python.org/pypi/setuptools#cygwin-mac-os-x-linux-other>`_
246-
for easy_install if you do not have it on your system already). You
247-
can try::
248-
249-
> easy_install matplotlib
250-
251-
which should grab the latest egg from github, but sometimes the naming
252-
conventions for OSX eggs can be broken (see below). Therefore, there
253-
is no guarantee the right egg will be found. We recommend you download
254-
the latest egg from our `download site
255-
<https://github.com/matplotlib/matplotlib/downloads>`_ directly to your
256-
harddrive, and manually install it, eg::
257-
258-
> easy_install --install-dir=~/path/to/site-packages/ matplotlib-1.2.0-py2.7-macosx-10.5-i386.egg
259-
260238
.. _install_from_source_on_osx_epd:
261239

262240
Building and installing from source on OSX with EPD
@@ -323,7 +301,7 @@ Binary installers for Windows
323301

324302
If you have already installed python, you can use one of the
325303
matplotlib binary installers for windows -- you can get these from the
326-
`download <https://github.com/matplotlib/matplotlib/downloads>`_ site.
304+
`download <http://matplotlib.org/downloads.html>`_ site.
327305
Choose the files that match your version of python (eg ``py2.7`` if
328306
you installed Python 2.7) which have the ``exe`` extension. If you
329307
haven't already installed python, you can get the official version

lib/matplotlib/axes.py

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5439,6 +5439,8 @@ def errorbar(self, x, y, yerr=None, xerr=None,
54395439
lines_kw['lw'] = kwargs['lw']
54405440
if 'transform' in kwargs:
54415441
lines_kw['transform'] = kwargs['transform']
5442+
if 'zorder' in kwargs:
5443+
lines_kw['zorder'] = kwargs['zorder']
54425444

54435445
# arrays fine here, they are booleans and hence not units
54445446
if not iterable(lolims):
@@ -5493,6 +5495,9 @@ def xywhere(xs, ys, mask):
54935495
plot_kw['mew'] = kwargs['mew']
54945496
if 'transform' in kwargs:
54955497
plot_kw['transform'] = kwargs['transform']
5498+
if 'zorder' in kwargs:
5499+
plot_kw['zorder'] = kwargs['zorder']
5500+
54965501

54975502
if xerr is not None:
54985503
if (iterable(xerr) and len(xerr) == 2 and
@@ -6433,32 +6438,39 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
64336438
offsets = offsets[good_idxs, :]
64346439
accum = accum[good_idxs]
64356440

6436-
if xscale == 'log':
6437-
offsets[:, 0] = 10 ** (offsets[:, 0])
6438-
xmin = 10 ** xmin
6439-
xmax = 10 ** xmax
6440-
self.set_xscale('log')
6441-
if yscale == 'log':
6442-
offsets[:, 1] = 10 ** (offsets[:, 1])
6443-
ymin = 10 ** ymin
6444-
ymax = 10 ** ymax
6445-
self.set_yscale('log')
6446-
64476441
polygon = np.zeros((6, 2), float)
64486442
polygon[:, 0] = sx * np.array([0.5, 0.5, 0.0, -0.5, -0.5, 0.0])
64496443
polygon[:, 1] = sy * np.array([-0.5, 0.5, 1.0, 0.5, -0.5, -1.0]) / 3.0
64506444

64516445
if edgecolors == 'none':
64526446
edgecolors = 'face'
64536447

6454-
collection = mcoll.PolyCollection(
6455-
[polygon],
6456-
edgecolors=edgecolors,
6457-
linewidths=linewidths,
6458-
offsets=offsets,
6459-
transOffset=mtransforms.IdentityTransform(),
6460-
offset_position="data"
6461-
)
6448+
if xscale == 'log' or yscale == 'log':
6449+
polygons = np.expand_dims(polygon, 0) + np.expand_dims(offsets, 1)
6450+
if xscale == 'log':
6451+
polygons[:, :, 0] = 10.0 ** polygons[:, :, 0]
6452+
xmin = 10.0 ** xmin
6453+
xmax = 10.0 ** xmax
6454+
self.set_xscale(xscale)
6455+
if yscale == 'log':
6456+
polygons[:, :, 1] = 10.0 ** polygons[:, :, 1]
6457+
ymin = 10.0 ** ymin
6458+
ymax = 10.0 ** ymax
6459+
self.set_yscale(yscale)
6460+
collection = mcoll.PolyCollection(
6461+
polygons,
6462+
edgecolors=edgecolors,
6463+
linewidths=linewidths,
6464+
)
6465+
else:
6466+
collection = mcoll.PolyCollection(
6467+
[polygon],
6468+
edgecolors=edgecolors,
6469+
linewidths=linewidths,
6470+
offsets=offsets,
6471+
transOffset=mtransforms.IdentityTransform(),
6472+
offset_position="data"
6473+
)
64626474

64636475
if isinstance(norm, mcolors.LogNorm):
64646476
if (accum == 0).any():

0 commit comments

Comments
 (0)