Skip to content

Commit

Permalink
Merge branch 'master' of github.com:matplotlib/matplotlib
Browse files Browse the repository at this point in the history
  • Loading branch information
mdboom committed Oct 28, 2011
2 parents 0ec7c7e + 7f1d181 commit 1aa1161
Show file tree
Hide file tree
Showing 83 changed files with 1,916 additions and 241 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2011-10-25 added support for \operatorname to mathtext,
including the ability to insert spaces, such as
$\operatorname{arg\,max}$ - PI

2011-08-18 Change api of Axes.get_tightbbox and add an optional
keyword parameter *call_axes_locator*. - JJL

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

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

:term:`numpy` 1.1 (or later)
array support for python (`download
Expand Down
3 changes: 1 addition & 2 deletions doc/devel/coding_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ in mind.
and consider posting to `matplotlib-devel
<http://lists.sourceforge.net/mailman/listinfo/matplotlib-devel>`_

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

* Can you pass :file:`examples/tests/backend_driver.py`? This is our
poor man's unit test.
Expand Down
2 changes: 1 addition & 1 deletion doc/users/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This page just covers the highlights -- for the full story, see the

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

.. _whats-new-1-1:
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"""
from __future__ import generators

__version__ = '1.1.0'
__version__ = '1.2.x'

import os, re, shutil, subprocess, sys, warnings
import distutils.sysconfig
Expand Down
31 changes: 31 additions & 0 deletions lib/matplotlib/_cm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1736,6 +1736,36 @@ def gfunc32(x):
(1.0, 0.150232812, 0.150232812)]
}

# Implementation of Carey Rappaport's CMRmap.
# See `A Color Map for Effective Black-and-White Rendering of Color-Scale Images' by Carey Rappaport
# http://www.mathworks.com/matlabcentral/fileexchange/2662-cmrmap-m
_CMRmap_data = {'red' : ( (0.000, 0.00, 0.00),
(0.125, 0.15, 0.15),
(0.250, 0.30, 0.30),
(0.375, 0.60, 0.60),
(0.500, 1.00, 1.00),
(0.625, 0.90, 0.90),
(0.750, 0.90, 0.90),
(0.875, 0.90, 0.90),
(1.000, 1.00, 1.00) ),
'green' : ( (0.000, 0.00, 0.00),
(0.125, 0.15, 0.15),
(0.250, 0.15, 0.15),
(0.375, 0.20, 0.20),
(0.500, 0.25, 0.25),
(0.625, 0.50, 0.50),
(0.750, 0.75, 0.75),
(0.875, 0.90, 0.90),
(1.000, 1.00, 1.00) ),
'blue': ( (0.000, 0.00, 0.00),
(0.125, 0.50, 0.50),
(0.250, 0.75, 0.75),
(0.375, 0.50, 0.50),
(0.500, 0.15, 0.15),
(0.625, 0.00, 0.00),
(0.750, 0.10, 0.10),
(0.875, 0.50, 0.50),
(1.000, 1.00, 1.00) )}

datad = {
'afmhot': _afmhot_data,
Expand All @@ -1744,6 +1774,7 @@ def gfunc32(x):
'binary': _binary_data,
'bwr': _bwr_data,
'brg': _brg_data,
'CMRmap': _CMRmap_data,
'cool': _cool_data,
'copper': _copper_data,
'cubehelix': _cubehelix_data,
Expand Down
23 changes: 22 additions & 1 deletion lib/matplotlib/backends/backend_qt4.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,28 @@ class FigureCanvasQT( QtGui.QWidget, FigureCanvasBase ):
keyvald = { QtCore.Qt.Key_Control : 'control',
QtCore.Qt.Key_Shift : 'shift',
QtCore.Qt.Key_Alt : 'alt',
QtCore.Qt.Key_Return : 'enter'
QtCore.Qt.Key_Return : 'enter',
QtCore.Qt.Key_Left : 'left',
QtCore.Qt.Key_Up : 'up',
QtCore.Qt.Key_Right : 'right',
QtCore.Qt.Key_Down : 'down',
QtCore.Qt.Key_Escape : 'escape',
QtCore.Qt.Key_F1 : 'f1',
QtCore.Qt.Key_F2 : 'f2',
QtCore.Qt.Key_F3 : 'f3',
QtCore.Qt.Key_F4 : 'f4',
QtCore.Qt.Key_F5 : 'f5',
QtCore.Qt.Key_F6 : 'f6',
QtCore.Qt.Key_F7 : 'f7',
QtCore.Qt.Key_F8 : 'f8',
QtCore.Qt.Key_F9 : 'f9',
QtCore.Qt.Key_F10 : 'f10',
QtCore.Qt.Key_F11 : 'f11',
QtCore.Qt.Key_F12 : 'f12',
QtCore.Qt.Key_Home : 'home',
QtCore.Qt.Key_End : 'end',
QtCore.Qt.Key_PageUp : 'pageup',
QtCore.Qt.Key_PageDown : 'pagedown',
}
# left 1, middle 2, right 3
buttond = {1:1, 2:3, 4:2}
Expand Down
19 changes: 11 additions & 8 deletions lib/matplotlib/gridspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,17 @@ def update(self, **kwargs):
if not isinstance(ax, SubplotBase):
# Check if sharing a subplots axis
if ax._sharex is not None and isinstance(ax._sharex, SubplotBase):
ax._sharex.update_params()
ax.set_position(ax._sharex.figbox)
if ax._sharex.get_subplotspec().get_gridspec() == self:
ax._sharex.update_params()
ax.set_position(ax._sharex.figbox)
elif ax._sharey is not None and isinstance(ax._sharey,SubplotBase):
ax._sharey.update_params()
ax.set_position(ax._sharey.figbox)
if ax._sharey.get_subplotspec().get_gridspec() == self:
ax._sharey.update_params()
ax.set_position(ax._sharey.figbox)
else:
ax.update_params()
ax.set_position(ax.figbox)
if ax.get_subplotspec().get_gridspec() == self:
ax.update_params()
ax.set_position(ax.figbox)



Expand Down Expand Up @@ -288,7 +291,7 @@ def tight_layout(self, fig, renderer=None, pad=1.2, h_pad=None, w_pad=None, rect
subplot_list = []
num1num2_list = []
subplot_dict = {}

for ax in fig.axes:
locator = ax.get_axes_locator()
if hasattr(locator, "get_subplotspec"):
Expand Down Expand Up @@ -341,7 +344,7 @@ def tight_layout(self, fig, renderer=None, pad=1.2, h_pad=None, w_pad=None, rect
pad=pad, h_pad=h_pad, w_pad=w_pad,
rect=(left, bottom, right, top))


self.update(**kwargs)


Expand Down
Loading

0 comments on commit 1aa1161

Please sign in to comment.