Skip to content

Final backports #11812

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 12 commits into from
Aug 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ Optionally, you can also install a number of packages to enable better user
interface toolkits. See :ref:`what-is-a-backend` for more details on the
optional Matplotlib backends and the capabilities they provide.

* :term:`tk` (>= 8.3, != 8.6.0 or 8.6.1): for the TkAgg backend;
* `PyQt4 <https://pypi.python.org/pypi/PyQt4>`_ (>= 4.4) or
`PySide <https://pypi.python.org/pypi/PySide>`_: for the Qt4Agg backend;
* `PyQt5 <https://pypi.python.org/pypi/PyQt5>`_: for the Qt5Agg backend;
* :term:`tk` (>= 8.3, != 8.6.0 or 8.6.1): for the Tk-based backends;
* `PyQt4 <https://pypi.python.org/pypi/PyQt4>`_ (>= 4.6) or
`PySide <https://pypi.python.org/pypi/PySide>`_: for the Qt4-based backend;
* `PyQt5 <https://pypi.python.org/pypi/PyQt5>`_: for the Qt5-based backend;
* :term:`pygtk` (>= 2.4): for the GTK and the GTKAgg backend;
* :term:`wxpython` (>= 2.9 or later): for the WX or WXAgg backend;
* `cairocffi <https://cairocffi.readthedocs.io/en/latest/>`__ (>=
Expand Down
4 changes: 2 additions & 2 deletions doc/api/api_changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ New dependency

`kiwisolver <https://github.com/nucleic/kiwi>`__ is now a required
dependency to support the new constrained_layout, see
:ref:`sphx_glr_tutorials_intermediate_constrainedlayout_guide.py` for
:doc:`/tutorials/intermediate/constrainedlayout_guide` for
more details.


Expand Down Expand Up @@ -1603,7 +1603,7 @@ original location:
* The legend handler interface has changed from a callable, to any object
which implements the ``legend_artists`` method (a deprecation phase will
see this interface be maintained for v1.4). See
:ref:`sphx_glr_tutorials_intermediate_legend_guide.py` for further details. Further legend changes
:doc:`/tutorials/intermediate/legend_guide` for further details. Further legend changes
include:

* :func:`matplotlib.axes.Axes._get_legend_handles` now returns a generator
Expand Down
10 changes: 6 additions & 4 deletions doc/api/backend_qt4agg_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
:mod:`matplotlib.backends.backend_qt4agg`
=========================================

.. automodule:: matplotlib.backends.backend_qt4agg
:members:
:undoc-members:
:show-inheritance:
**NOTE** Not included, to avoid adding a dependency to building the docs.

.. .. automodule:: matplotlib.backends.backend_qt4agg
.. :members:
.. :undoc-members:
.. :show-inheritance:
10 changes: 6 additions & 4 deletions doc/api/backend_qt4cairo_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
:mod:`matplotlib.backends.backend_qt4cairo`
===========================================

.. automodule:: matplotlib.backends.backend_qt4cairo
:members:
:undoc-members:
:show-inheritance:
**NOTE** Not included, to avoid adding a dependency to building the docs.

.. .. automodule:: matplotlib.backends.backend_qt4cairo
.. :members:
.. :undoc-members:
.. :show-inheritance:
10 changes: 6 additions & 4 deletions doc/api/backend_qt5agg_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
:mod:`matplotlib.backends.backend_qt5agg`
=========================================

.. automodule:: matplotlib.backends.backend_qt5agg
:members:
:undoc-members:
:show-inheritance:
**NOTE** Not included, to avoid adding a dependency to building the docs.

.. .. automodule:: matplotlib.backends.backend_qt5agg
.. :members:
.. :undoc-members:
.. :show-inheritance:
10 changes: 6 additions & 4 deletions doc/api/backend_qt5cairo_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
:mod:`matplotlib.backends.backend_qt5cairo`
===========================================

.. automodule:: matplotlib.backends.backend_qt5cairo
:members:
:undoc-members:
:show-inheritance:
**NOTE** Not included, to avoid adding a dependency to building the docs.

.. .. automodule:: matplotlib.backends.backend_qt5cairo
.. :members:
.. :undoc-members:
.. :show-inheritance:
4 changes: 2 additions & 2 deletions doc/api/pyplot_summary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The Pyplot API
The :mod:`matplotlib.pyplot` module contains functions that allow you to generate
many kinds of plots quickly. For examples that showcase the use
of the :mod:`matplotlib.pyplot` module, see the
:ref:`sphx_glr_tutorials_introductory_pyplot.py`
:doc:`/tutorials/introductory/pyplot`
or the :ref:`pyplots_examples`. We also recommend that you look into
the object-oriented approach to plotting, described below.

Expand Down Expand Up @@ -38,6 +38,6 @@ There are many colormaps you can use to map data onto color values.
Below we list several ways in which color can be utilized in Matplotlib.

For a more in-depth look at colormaps, see the
:ref:`sphx_glr_tutorials_colors_colormaps.py` tutorial.
:doc:`/tutorials/colors/colormaps` tutorial.

.. autofunction:: colormaps
2 changes: 1 addition & 1 deletion doc/devel/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ Developing a new backend
------------------------

If you are working on a custom backend, the *backend* setting in
:file:`matplotlibrc` (:ref:`sphx_glr_tutorials_introductory_customizing.py`) supports an
:file:`matplotlibrc` (:doc:`/tutorials/introductory/customizing`) supports an
external backend via the ``module`` directive. If
:file:`my_backend.py` is a Matplotlib backend in your
:envvar:`PYTHONPATH`, you can set it on one of several ways
Expand Down
16 changes: 8 additions & 8 deletions doc/faq/howto_faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ If you only want to use the `pandas` converter for `datetime64` values ::
Find all objects in a figure of a certain type
----------------------------------------------

Every Matplotlib artist (see :ref:`sphx_glr_tutorials_intermediate_artists.py`) has a method
Every Matplotlib artist (see :doc:`/tutorials/intermediate/artists`) has a method
called :meth:`~matplotlib.artist.Artist.findobj` that can be used to
recursively search the artist for any artists it may contain that meet
some criteria (e.g., match all :class:`~matplotlib.lines.Line2D`
Expand Down Expand Up @@ -155,7 +155,7 @@ labels::
ax = fig.add_subplot(111)

You can control the defaults for these parameters in your
:file:`matplotlibrc` file; see :ref:`sphx_glr_tutorials_introductory_customizing.py`. For
:file:`matplotlibrc` file; see :doc:`/tutorials/introductory/customizing`. For
example, to make the above setting permanent, you would set::

figure.subplot.bottom : 0.2 # the bottom of the subplots of the figure
Expand Down Expand Up @@ -186,7 +186,7 @@ specify the location explicitly::
ax = fig.add_axes([left, bottom, width, height])

where all values are in fractional (0 to 1) coordinates. See
:ref:`sphx_glr_gallery_subplots_axes_and_figures_axes_demo.py` for an example of placing axes manually.
:doc:`/gallery/subplots_axes_and_figures/axes_demo` for an example of placing axes manually.

.. _howto-auto-adjust:

Expand All @@ -196,7 +196,7 @@ Automatically make room for tick labels
.. note::
This is now easier to handle than ever before.
Calling :func:`~matplotlib.pyplot.tight_layout` can fix many common
layout issues. See the :ref:`sphx_glr_tutorials_intermediate_tight_layout_guide.py`.
layout issues. See the :doc:`/tutorials/intermediate/tight_layout_guide`.

The information below is kept here in case it is useful for other
purposes.
Expand Down Expand Up @@ -348,7 +348,7 @@ and patches, respectively::

.. htmlonly::

See :ref:`sphx_glr_gallery_misc_zorder_demo.py` for a complete example.
See :doc:`/gallery/misc/zorder_demo` for a complete example.

You can also use the Axes property
:meth:`~matplotlib.axes.Axes.set_axisbelow` to control whether the grid
Expand All @@ -367,7 +367,7 @@ some ratio which controls the ratio::

.. htmlonly::

See :ref:`sphx_glr_gallery_subplots_axes_and_figures_axis_equal_demo.py` for a
See :doc:`/gallery/subplots_axes_and_figures/axis_equal_demo` for a
complete example.

.. _howto-twoscale:
Expand Down Expand Up @@ -411,7 +411,7 @@ locators as desired because the two axes are independent.

.. htmlonly::

See :ref:`sphx_glr_gallery_api_two_scales.py` for a complete example
See :doc:`/gallery/api/two_scales` for a complete example

.. _howto-batch:

Expand Down Expand Up @@ -657,7 +657,7 @@ For more on configuring your backend, see

Alternatively, you can avoid pylab/pyplot altogether, which will give
you a little more control, by calling the API directly as shown in
:ref:`sphx_glr_gallery_api_agg_oo_sgskip.py`.
:doc:`/gallery/api/agg_oo_sgskip`.

You can either generate hardcopy on the filesystem by calling savefig::

Expand Down
2 changes: 1 addition & 1 deletion doc/faq/installing_faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ example::

This will give you additional information about which backends matplotlib is
loading, version information, and more. At this point you might want to make
sure you understand matplotlib's :ref:`configuration <sphx_glr_tutorials_introductory_customizing.py>`
sure you understand matplotlib's :doc:`configuration </tutorials/introductory/customizing>`
process, governed by the :file:`matplotlibrc` configuration file which contains
instructions within and the concept of the matplotlib backend.

Expand Down
2 changes: 1 addition & 1 deletion doc/faq/troubleshooting_faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ provide the following information in your e-mail to the `mailing list
`Enthought Canopy <https://www.enthought.com/products/canopy/>`_).

* Any customizations to your ``matplotlibrc`` file (see
:ref:`sphx_glr_tutorials_introductory_customizing.py`).
:doc:`/tutorials/introductory/customizing`).

* If the problem is reproducible, please try to provide a *minimal*, standalone
Python script that demonstrates the problem. This is *the* critical step.
Expand Down
2 changes: 1 addition & 1 deletion doc/mpl_toolkits/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ mplot3d
plotting (scatter, surf, line, mesh) tools. Not the fastest or most feature
complete 3D library out there, but it ships with Matplotlib and thus may be a
lighter weight solution for some use cases. Check out the
:ref:`mplot3d tutorial <sphx_glr_tutorials_toolkits_mplot3d.py>` for more
:doc:`mplot3d tutorial </tutorials/toolkits/mplot3d>` for more
information.

.. figure:: ../gallery/mplot3d/images/sphx_glr_contourf3d_2_001.png
Expand Down
2 changes: 1 addition & 1 deletion doc/mpl_toolkits/mplot3d/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The mplot3d toolkit adds simple 3D plotting capabilities to matplotlib by
supplying an axes object that can create a 2D projection of a 3D scene.
The resulting graph will have the same look and feel as regular 2D plots.

See the :ref:`mplot3d tutorial <sphx_glr_tutorials_toolkits_mplot3d.py>` for
See the :doc:`mplot3d tutorial </tutorials/toolkits/mplot3d>` for
more information on how to use this toolkit.

.. image:: ../../_static/demo_mplot3d.png
Expand Down
104 changes: 0 additions & 104 deletions doc/sphinxext/mock_gui_toolkits.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,108 +10,6 @@ class MyCairoCffi(MagicMock):
version_info = (1, 4, 0)


class MyPyQt4(MagicMock):
class QtGui(object):
# PyQt4.QtGui public classes.
# Generated with
# textwrap.fill([name for name in dir(PyQt4.QtGui)
# if isinstance(getattr(PyQt4.QtGui, name), type)])
_QtGui_public_classes = """\
Display QAbstractButton QAbstractGraphicsShapeItem
QAbstractItemDelegate QAbstractItemView QAbstractPrintDialog
QAbstractProxyModel QAbstractScrollArea QAbstractSlider
QAbstractSpinBox QAbstractTextDocumentLayout QAction QActionEvent
QActionGroup QApplication QBitmap QBoxLayout QBrush QButtonGroup
QCalendarWidget QCheckBox QClipboard QCloseEvent QColor QColorDialog
QColumnView QComboBox QCommandLinkButton QCommonStyle QCompleter
QConicalGradient QContextMenuEvent QCursor QDataWidgetMapper QDateEdit
QDateTimeEdit QDesktopServices QDesktopWidget QDial QDialog
QDialogButtonBox QDirModel QDockWidget QDoubleSpinBox QDoubleValidator
QDrag QDragEnterEvent QDragLeaveEvent QDragMoveEvent QDropEvent
QErrorMessage QFileDialog QFileIconProvider QFileOpenEvent
QFileSystemModel QFocusEvent QFocusFrame QFont QFontComboBox
QFontDatabase QFontDialog QFontInfo QFontMetrics QFontMetricsF
QFormLayout QFrame QGesture QGestureEvent QGestureRecognizer QGlyphRun
QGradient QGraphicsAnchor QGraphicsAnchorLayout QGraphicsBlurEffect
QGraphicsColorizeEffect QGraphicsDropShadowEffect QGraphicsEffect
QGraphicsEllipseItem QGraphicsGridLayout QGraphicsItem
QGraphicsItemAnimation QGraphicsItemGroup QGraphicsLayout
QGraphicsLayoutItem QGraphicsLineItem QGraphicsLinearLayout
QGraphicsObject QGraphicsOpacityEffect QGraphicsPathItem
QGraphicsPixmapItem QGraphicsPolygonItem QGraphicsProxyWidget
QGraphicsRectItem QGraphicsRotation QGraphicsScale QGraphicsScene
QGraphicsSceneContextMenuEvent QGraphicsSceneDragDropEvent
QGraphicsSceneEvent QGraphicsSceneHelpEvent QGraphicsSceneHoverEvent
QGraphicsSceneMouseEvent QGraphicsSceneMoveEvent
QGraphicsSceneResizeEvent QGraphicsSceneWheelEvent
QGraphicsSimpleTextItem QGraphicsTextItem QGraphicsTransform
QGraphicsView QGraphicsWidget QGridLayout QGroupBox QHBoxLayout
QHeaderView QHelpEvent QHideEvent QHoverEvent QIcon QIconDragEvent
QIconEngine QIconEngineV2 QIdentityProxyModel QImage QImageIOHandler
QImageReader QImageWriter QInputContext QInputContextFactory
QInputDialog QInputEvent QInputMethodEvent QIntValidator QItemDelegate
QItemEditorCreatorBase QItemEditorFactory QItemSelection
QItemSelectionModel QItemSelectionRange QKeyEvent QKeyEventTransition
QKeySequence QLCDNumber QLabel QLayout QLayoutItem QLineEdit
QLinearGradient QListView QListWidget QListWidgetItem QMainWindow
QMatrix QMatrix2x2 QMatrix2x3 QMatrix2x4 QMatrix3x2 QMatrix3x3
QMatrix3x4 QMatrix4x2 QMatrix4x3 QMatrix4x4 QMdiArea QMdiSubWindow
QMenu QMenuBar QMessageBox QMimeSource QMouseEvent
QMouseEventTransition QMoveEvent QMovie QPageSetupDialog QPaintDevice
QPaintEngine QPaintEngineState QPaintEvent QPainter QPainterPath
QPainterPathStroker QPalette QPanGesture QPen QPicture QPictureIO
QPinchGesture QPixmap QPixmapCache QPlainTextDocumentLayout
QPlainTextEdit QPolygon QPolygonF QPrintDialog QPrintEngine
QPrintPreviewDialog QPrintPreviewWidget QPrinter QPrinterInfo
QProgressBar QProgressDialog QProxyModel QPushButton QPyTextObject
QQuaternion QRadialGradient QRadioButton QRawFont QRegExpValidator
QRegion QResizeEvent QRubberBand QScrollArea QScrollBar
QSessionManager QShortcut QShortcutEvent QShowEvent QSizeGrip
QSizePolicy QSlider QSortFilterProxyModel QSound QSpacerItem QSpinBox
QSplashScreen QSplitter QSplitterHandle QStackedLayout QStackedWidget
QStandardItem QStandardItemModel QStaticText QStatusBar
QStatusTipEvent QStringListModel QStyle QStyleFactory QStyleHintReturn
QStyleHintReturnMask QStyleHintReturnVariant QStyleOption
QStyleOptionButton QStyleOptionComboBox QStyleOptionComplex
QStyleOptionDockWidget QStyleOptionDockWidgetV2 QStyleOptionFocusRect
QStyleOptionFrame QStyleOptionFrameV2 QStyleOptionFrameV3
QStyleOptionGraphicsItem QStyleOptionGroupBox QStyleOptionHeader
QStyleOptionMenuItem QStyleOptionProgressBar QStyleOptionProgressBarV2
QStyleOptionRubberBand QStyleOptionSizeGrip QStyleOptionSlider
QStyleOptionSpinBox QStyleOptionTab QStyleOptionTabBarBase
QStyleOptionTabBarBaseV2 QStyleOptionTabV2 QStyleOptionTabV3
QStyleOptionTabWidgetFrame QStyleOptionTabWidgetFrameV2
QStyleOptionTitleBar QStyleOptionToolBar QStyleOptionToolBox
QStyleOptionToolBoxV2 QStyleOptionToolButton QStyleOptionViewItem
QStyleOptionViewItemV2 QStyleOptionViewItemV3 QStyleOptionViewItemV4
QStylePainter QStyledItemDelegate QSwipeGesture QSyntaxHighlighter
QSystemTrayIcon QTabBar QTabWidget QTableView QTableWidget
QTableWidgetItem QTableWidgetSelectionRange QTabletEvent
QTapAndHoldGesture QTapGesture QTextBlock QTextBlockFormat
QTextBlockGroup QTextBlockUserData QTextBrowser QTextCharFormat
QTextCursor QTextDocument QTextDocumentFragment QTextDocumentWriter
QTextEdit QTextFormat QTextFragment QTextFrame QTextFrameFormat
QTextImageFormat QTextInlineObject QTextItem QTextLayout QTextLength
QTextLine QTextList QTextListFormat QTextObject QTextObjectInterface
QTextOption QTextTable QTextTableCell QTextTableCellFormat
QTextTableFormat QTimeEdit QToolBar QToolBox QToolButton QToolTip
QTouchEvent QTransform QTreeView QTreeWidget QTreeWidgetItem
QTreeWidgetItemIterator QUndoCommand QUndoGroup QUndoStack QUndoView
QVBoxLayout QValidator QVector2D QVector3D QVector4D QWhatsThis
QWhatsThisClickedEvent QWheelEvent QWidget QWidgetAction QWidgetItem
QWindowStateChangeEvent QWizard QWizardPage QWorkspace
QX11EmbedContainer QX11EmbedWidget QX11Info
"""
for _name in _QtGui_public_classes.split():
locals()[_name] = type(_name, (), {})
del _name


class MySip(MagicMock):
def getapi(*args):
return 1


class MyWX(MagicMock):
class Panel(object):
pass
Expand All @@ -127,8 +25,6 @@ class Frame(object):

def setup(app):
sys.modules['cairocffi'] = MyCairoCffi()
sys.modules['PyQt4'] = MyPyQt4()
sys.modules['sip'] = MySip()
sys.modules['wx'] = MyWX()
sys.modules['wxversion'] = MagicMock()

Expand Down
4 changes: 2 additions & 2 deletions doc/users/dflt_style_changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ are only specified via hex values. To access these colors outside of
the property cycling the notation for colors ``'CN'``, where ``N``
takes values 0-9, was added to
denote the first 10 colors in ``mpl.rcParams['axes.prop_cycle']`` See
:ref:`sphx_glr_tutorials_colors_colors.py` for more details.
:doc:`/tutorials/colors/colors` for more details.

To restore the old color cycle use

Expand Down Expand Up @@ -145,7 +145,7 @@ watch Nathaniel Smith and Stéfan van der Walt's talk from SciPy2015.
See `here for many more details <https://bids.github.io/colormap/>`__
about the other alternatives and the tools used to create the color
map. For details on all of the color maps available in matplotlib see
:ref:`sphx_glr_tutorials_colors_colormaps.py`.
:doc:`/tutorials/colors/colormaps`.

.. raw:: html

Expand Down
2 changes: 1 addition & 1 deletion doc/users/prev_whats_new/whats_new_0.98.4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ psd amplitude scaling

Ryan May did a lot of work to rationalize the amplitude scaling of
:func:`~matplotlib.pyplot.psd` and friends. See
:ref:`sphx_glr_gallery_lines_bars_and_markers_psd_demo.py`.
:doc:`/gallery/lines_bars_and_markers/psd_demo`.
The changes should increase MATLAB
compatibility and increase scaling options.

Expand Down
10 changes: 5 additions & 5 deletions doc/users/prev_whats_new/whats_new_0.99.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ New in matplotlib 0.99
New documentation
-----------------

Jae-Joon Lee has written two new guides :ref:`sphx_glr_tutorials_intermediate_legend_guide.py`
Jae-Joon Lee has written two new guides :doc:`/tutorials/intermediate/legend_guide`
and :ref:`plotting-guide-annotation`. Michael Sarahan has written
:ref:`sphx_glr_tutorials_introductory_images.py`. John Hunter has written two new tutorials on
working with paths and transformations: :ref:`sphx_glr_tutorials_advanced_path_tutorial.py` and
:ref:`sphx_glr_tutorials_advanced_transforms_tutorial.py`.
:doc:`/tutorials/introductory/images`. John Hunter has written two new tutorials on
working with paths and transformations: :doc:`/tutorials/advanced/path_tutorial` and
:doc:`/tutorials/advanced/transforms_tutorial`.

.. _whats-new-mplot3d:

Expand Down Expand Up @@ -65,7 +65,7 @@ that denote the data limits -- in various arbitrary locations. No
longer are your axis lines constrained to be a simple rectangle around
the figure -- you can turn on or off left, bottom, right and top, as
well as "detach" the spine to offset it away from the data. See
:ref:`sphx_glr_gallery_ticks_and_spines_spine_placement_demo.py` and
:doc:`/gallery/ticks_and_spines/spine_placement_demo` and
:class:`matplotlib.spines.Spine`.

.. figure:: ../../gallery/pyplots/images/sphx_glr_whats_new_99_spines_001.png
Expand Down
Loading