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

Skip to content

Commit a98cabc

Browse files
committed
Merge branch 'master' of https://github.com/matplotlib/matplotlib into issue_10267
2 parents b5d3a11 + 869c984 commit a98cabc

File tree

7 files changed

+28
-41
lines changed

7 files changed

+28
-41
lines changed

doc/citing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ If Matplotlib contributes to a project that leads to a scientific
77
publication, please acknowledge this fact by citing `Hunter et al (2007)
88
<http://doi.org/10.1109/MCSE.2007.55>`_ using this ready-made BibTeX entry:
99

10-
.. code:: bibtex
10+
.. code-block:: bibtex
1111
1212
@Article{Hunter:2007,
1313
Author = {Hunter, J. D.},

doc/faq/osx_framework.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Working with Matplotlib on OSX
77
.. contents::
88
:backlinks: none
99

10+
.. highlight:: bash
1011

1112
.. _osxframework_introduction:
1213

@@ -77,9 +78,7 @@ Until this is fixed, one of the following workarounds can be used:
7778

7879
The best known work around is to use the non
7980
virtualenv python along with the PYTHONHOME environment variable.
80-
This can be done by defining a function in your ``.bashrc`` using
81-
82-
.. code:: bash
81+
This can be done by defining a function in your ``.bashrc`` using ::
8382

8483
function frameworkpython {
8584
if [[ ! -z "$VIRTUAL_ENV" ]]; then
@@ -115,9 +114,7 @@ An alternative work around borrowed from the `WX wiki
115114
virtualenv python along with the PYTHONHOME environment variable. This can be
116115
implemented in a script as below. To use this modify ``PYVER`` and
117116
``PATHTOPYTHON`` and put the script in the virtualenv bin directory i.e.
118-
``PATHTOVENV/bin/frameworkpython``
119-
120-
.. code:: bash
117+
``PATHTOVENV/bin/frameworkpython`` ::
121118

122119
#!/bin/bash
123120

lib/matplotlib/cm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ def set_clim(self, vmin=None, vmax=None):
305305
sequence, interpret it as ``(vmin, vmax)`` which is used to
306306
support setp
307307
308-
ACCEPTS: a length 2 sequence of floats
308+
ACCEPTS: a length 2 sequence of floats; may be overridden in methods
309+
that have ``vmin`` and ``vmax`` kwargs.
309310
"""
310311
if vmax is None:
311312
try:

lib/matplotlib/rcsetup.py

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -267,27 +267,26 @@ def validate_backend(s):
267267

268268

269269
def validate_qt4(s):
270-
# Don't spam the test suite with warnings every time the rcparams are
271-
# reset. While it may seem better to use filterwarnings from within the
272-
# test suite, pytest 3.1+ explicitly disregards warnings filters (pytest
273-
# issue #2430).
274-
if not testing.is_called_from_pytest():
275-
cbook.warn_deprecated(
276-
"2.2",
277-
"The backend.qt4 rcParam was deprecated in version 2.2. In order "
278-
"to force the use of a specific Qt4 binding, either import that "
279-
"binding first, or set the QT_API environment variable.")
270+
if s is None:
271+
# return a reasonable default for deprecation period
272+
return 'PyQt4'
273+
cbook.warn_deprecated(
274+
"2.2",
275+
"The backend.qt4 rcParam was deprecated in version 2.2. In order "
276+
"to force the use of a specific Qt4 binding, either import that "
277+
"binding first, or set the QT_API environment variable.")
280278
return ValidateInStrings("backend.qt4", ['PyQt4', 'PySide', 'PyQt4v2'])(s)
281279

282280

283281
def validate_qt5(s):
284-
# See comment re: validate_qt4.
285-
if not testing.is_called_from_pytest():
286-
cbook.warn_deprecated(
287-
"2.2",
288-
"The backend.qt5 rcParam was deprecated in version 2.2. In order "
289-
"to force the use of a specific Qt5 binding, either import that "
290-
"binding first, or set the QT_API environment variable.")
282+
if s is None:
283+
# return a reasonable default for deprecation period
284+
return 'PyQt5'
285+
cbook.warn_deprecated(
286+
"2.2",
287+
"The backend.qt5 rcParam was deprecated in version 2.2. In order "
288+
"to force the use of a specific Qt5 binding, either import that "
289+
"binding first, or set the QT_API environment variable.")
291290
return ValidateInStrings("backend.qt5", ['PyQt5', 'PySide2'])(s)
292291

293292

@@ -958,8 +957,8 @@ def _validate_linestyle(ls):
958957
'backend': ['Agg', validate_backend], # agg is certainly
959958
# present
960959
'backend_fallback': [True, validate_bool], # agg is certainly present
961-
'backend.qt4': ['PyQt4', validate_qt4],
962-
'backend.qt5': ['PyQt5', validate_qt5],
960+
'backend.qt4': [None, validate_qt4],
961+
'backend.qt5': [None, validate_qt5],
963962
'webagg.port': [8988, validate_int],
964963
'webagg.address': ['127.0.0.1', validate_webagg_address],
965964
'webagg.open_in_browser': [True, validate_bool],

matplotlibrc.template

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@
4040
# non-interactive backend.
4141
backend : $TEMPLATE_BACKEND
4242

43-
# If you are using the Qt4Agg backend, you can choose here
44-
# to use the PyQt4 bindings or the newer PySide bindings to
45-
# the underlying Qt4 toolkit.
46-
#backend.qt4 : PyQt4 # PyQt4 | PySide
47-
4843
# Note that this can be overridden by the environment variable
4944
# QT_API used by Enthought Tool Suite (ETS); valid values are
5045
# "pyqt" and "pyside". The "pyqt" setting has the side effect of

tutorials/introductory/images.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
notebook. This has important implications for interactivity. For inline plotting, commands in
3333
cells below the cell that outputs a plot will not affect the plot. For example,
3434
changing the color map is not possible from cells below the cell that creates a plot.
35-
However, for other backends, such as qt4, that open a separate window,
35+
However, for other backends, such as Qt5, that open a separate window,
3636
cells below those that create the plot will change the plot - it is a
3737
live object in memory.
3838
@@ -266,7 +266,7 @@
266266
imgplot = plt.imshow(img, interpolation="nearest")
267267

268268
###############################################################################
269-
# and bucibic:
269+
# and bicubic:
270270

271271
imgplot = plt.imshow(img, interpolation="bicubic")
272272

tutorials/introductory/usage.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -495,13 +495,8 @@ def my_plotter(ax, data1, data2, param_dict):
495495
# How do I select PyQt4 or PySide?
496496
# --------------------------------
497497
#
498-
# You can choose either PyQt4 or PySide when using the `qt4` backend by setting
499-
# the appropriate value for `backend.qt4` in your :file:`matplotlibrc` file. The
500-
# default value is `PyQt4`.
501-
#
502-
# The setting in your :file:`matplotlibrc` file can be overridden by setting the
503-
# `QT_API` environment variable to either `pyqt` or `pyside` to use `PyQt4` or
504-
# `PySide`, respectively.
498+
# The `QT_API` environment variable can be set to either `pyqt` or `pyside`
499+
# to use `PyQt4` or `PySide`, respectively.
505500
#
506501
# Since the default value for the bindings to be used is `PyQt4`,
507502
# :mod:`matplotlib` first tries to import it, if the import fails, it tries to

0 commit comments

Comments
 (0)