Skip to content

Commit 1aa1161

Browse files
committed
Merge branch 'master' of github.com:matplotlib/matplotlib
2 parents 0ec7c7e + 7f1d181 commit 1aa1161

Some content is hidden

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

83 files changed

+1916
-241
lines changed

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2011-10-25 added support for \operatorname to mathtext,
2+
including the ability to insert spaces, such as
3+
$\operatorname{arg\,max}$ - PI
4+
15
2011-08-18 Change api of Axes.get_tightbbox and add an optional
26
keyword parameter *call_axes_locator*. - JJL
37

INSTALL

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Next, we need to get matplotlib installed. We provide prebuilt
5454
binaries for OS X and Windows on the matplotlib `download
5555
<http://sourceforge.net/projects/matplotlib/files/>`_ page. Click on
5656
the latest release of the "matplotlib" package, choose your python
57-
version (e.g., 2.5, 2.6 or 2.7) and your platform (macosx or win32).
57+
version (e.g., 2.6 or 2.7) and your platform (macosx or win32).
5858
If you have any problems, please check the :ref:`installing-faq`,
5959
search using Google, and/or post a question to the `mailing list
6060
<http://sourceforge.net/project/showfiles.php?group_id=80706>`_.
@@ -179,8 +179,8 @@ libraries themselves.
179179
This does not build matplotlib, but it does get the install the
180180
build dependencies, which will make building from source easier.
181181

182-
:term:`python` 2.4 (or later but not python3)
183-
matplotlib requires python 2.4 or later (`download <http://www.python.org/download/>`__)
182+
:term:`python` 2.6 (or later but not python3)
183+
matplotlib requires python 2.6 or later (`download <http://www.python.org/download/>`__)
184184

185185
:term:`numpy` 1.1 (or later)
186186
array support for python (`download

doc/devel/coding_guide.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ in mind.
1717
and consider posting to `matplotlib-devel
1818
<http://lists.sourceforge.net/mailman/listinfo/matplotlib-devel>`_
1919

20-
* Are your changes python2.4 compatible? We still support 2.4, so
21-
avoid features new to 2.5
20+
* Are your changes python2.6 compatible? We support python2.6 and later
2221

2322
* Can you pass :file:`examples/tests/backend_driver.py`? This is our
2423
poor man's unit test.

doc/users/whats_new.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This page just covers the highlights -- for the full story, see the
99

1010
.. note::
1111
Matplotlib version 1.1 is the last major release compatible with Python
12-
versions 2.4 to 2.7. The next major release will support
12+
versions 2.4 to 2.7. matplotlib 1.2 and later require
1313
versions 2.6, 2.7, and 3.1 and higher.
1414

1515
.. _whats-new-1-1:

lib/matplotlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
"""
100100
from __future__ import generators
101101

102-
__version__ = '1.1.0'
102+
__version__ = '1.2.x'
103103

104104
import os, re, shutil, subprocess, sys, warnings
105105
import distutils.sysconfig

lib/matplotlib/_cm.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1736,6 +1736,36 @@ def gfunc32(x):
17361736
(1.0, 0.150232812, 0.150232812)]
17371737
}
17381738

1739+
# Implementation of Carey Rappaport's CMRmap.
1740+
# See `A Color Map for Effective Black-and-White Rendering of Color-Scale Images' by Carey Rappaport
1741+
# http://www.mathworks.com/matlabcentral/fileexchange/2662-cmrmap-m
1742+
_CMRmap_data = {'red' : ( (0.000, 0.00, 0.00),
1743+
(0.125, 0.15, 0.15),
1744+
(0.250, 0.30, 0.30),
1745+
(0.375, 0.60, 0.60),
1746+
(0.500, 1.00, 1.00),
1747+
(0.625, 0.90, 0.90),
1748+
(0.750, 0.90, 0.90),
1749+
(0.875, 0.90, 0.90),
1750+
(1.000, 1.00, 1.00) ),
1751+
'green' : ( (0.000, 0.00, 0.00),
1752+
(0.125, 0.15, 0.15),
1753+
(0.250, 0.15, 0.15),
1754+
(0.375, 0.20, 0.20),
1755+
(0.500, 0.25, 0.25),
1756+
(0.625, 0.50, 0.50),
1757+
(0.750, 0.75, 0.75),
1758+
(0.875, 0.90, 0.90),
1759+
(1.000, 1.00, 1.00) ),
1760+
'blue': ( (0.000, 0.00, 0.00),
1761+
(0.125, 0.50, 0.50),
1762+
(0.250, 0.75, 0.75),
1763+
(0.375, 0.50, 0.50),
1764+
(0.500, 0.15, 0.15),
1765+
(0.625, 0.00, 0.00),
1766+
(0.750, 0.10, 0.10),
1767+
(0.875, 0.50, 0.50),
1768+
(1.000, 1.00, 1.00) )}
17391769

17401770
datad = {
17411771
'afmhot': _afmhot_data,
@@ -1744,6 +1774,7 @@ def gfunc32(x):
17441774
'binary': _binary_data,
17451775
'bwr': _bwr_data,
17461776
'brg': _brg_data,
1777+
'CMRmap': _CMRmap_data,
17471778
'cool': _cool_data,
17481779
'copper': _copper_data,
17491780
'cubehelix': _cubehelix_data,

lib/matplotlib/backends/backend_qt4.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,28 @@ class FigureCanvasQT( QtGui.QWidget, FigureCanvasBase ):
120120
keyvald = { QtCore.Qt.Key_Control : 'control',
121121
QtCore.Qt.Key_Shift : 'shift',
122122
QtCore.Qt.Key_Alt : 'alt',
123-
QtCore.Qt.Key_Return : 'enter'
123+
QtCore.Qt.Key_Return : 'enter',
124+
QtCore.Qt.Key_Left : 'left',
125+
QtCore.Qt.Key_Up : 'up',
126+
QtCore.Qt.Key_Right : 'right',
127+
QtCore.Qt.Key_Down : 'down',
128+
QtCore.Qt.Key_Escape : 'escape',
129+
QtCore.Qt.Key_F1 : 'f1',
130+
QtCore.Qt.Key_F2 : 'f2',
131+
QtCore.Qt.Key_F3 : 'f3',
132+
QtCore.Qt.Key_F4 : 'f4',
133+
QtCore.Qt.Key_F5 : 'f5',
134+
QtCore.Qt.Key_F6 : 'f6',
135+
QtCore.Qt.Key_F7 : 'f7',
136+
QtCore.Qt.Key_F8 : 'f8',
137+
QtCore.Qt.Key_F9 : 'f9',
138+
QtCore.Qt.Key_F10 : 'f10',
139+
QtCore.Qt.Key_F11 : 'f11',
140+
QtCore.Qt.Key_F12 : 'f12',
141+
QtCore.Qt.Key_Home : 'home',
142+
QtCore.Qt.Key_End : 'end',
143+
QtCore.Qt.Key_PageUp : 'pageup',
144+
QtCore.Qt.Key_PageDown : 'pagedown',
124145
}
125146
# left 1, middle 2, right 3
126147
buttond = {1:1, 2:3, 4:2}

lib/matplotlib/gridspec.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -233,14 +233,17 @@ def update(self, **kwargs):
233233
if not isinstance(ax, SubplotBase):
234234
# Check if sharing a subplots axis
235235
if ax._sharex is not None and isinstance(ax._sharex, SubplotBase):
236-
ax._sharex.update_params()
237-
ax.set_position(ax._sharex.figbox)
236+
if ax._sharex.get_subplotspec().get_gridspec() == self:
237+
ax._sharex.update_params()
238+
ax.set_position(ax._sharex.figbox)
238239
elif ax._sharey is not None and isinstance(ax._sharey,SubplotBase):
239-
ax._sharey.update_params()
240-
ax.set_position(ax._sharey.figbox)
240+
if ax._sharey.get_subplotspec().get_gridspec() == self:
241+
ax._sharey.update_params()
242+
ax.set_position(ax._sharey.figbox)
241243
else:
242-
ax.update_params()
243-
ax.set_position(ax.figbox)
244+
if ax.get_subplotspec().get_gridspec() == self:
245+
ax.update_params()
246+
ax.set_position(ax.figbox)
244247

245248

246249

@@ -288,7 +291,7 @@ def tight_layout(self, fig, renderer=None, pad=1.2, h_pad=None, w_pad=None, rect
288291
subplot_list = []
289292
num1num2_list = []
290293
subplot_dict = {}
291-
294+
292295
for ax in fig.axes:
293296
locator = ax.get_axes_locator()
294297
if hasattr(locator, "get_subplotspec"):
@@ -341,7 +344,7 @@ def tight_layout(self, fig, renderer=None, pad=1.2, h_pad=None, w_pad=None, rect
341344
pad=pad, h_pad=h_pad, w_pad=w_pad,
342345
rect=(left, bottom, right, top))
343346

344-
347+
345348
self.update(**kwargs)
346349

347350

0 commit comments

Comments
 (0)