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

Skip to content

Merge 2.x to master #6557

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 34 commits into from
Jun 8, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
9c586f2
py3k: Fix print statements in docstrings.
QuLogic May 29, 2016
7605dd4
Merge pull request #6496 from QuLogic/py3k-print-doc
efiring May 29, 2016
9158c69
DOC: make example a bit wider + remove lines
tacaswell May 30, 2016
e89d32d
DOC: update annotation docstrings
tacaswell May 22, 2016
f649739
DOC: tweak showcase example
tacaswell May 30, 2016
b3c21d3
DOC: tweak demo a bit
tacaswell May 30, 2016
ff98856
Merge pull request #6481 from jenshnielsen/default-boxplot-style-rebase
tacaswell May 30, 2016
72653f2
Merge pull request #6504 from jenshnielsen/patch-issue-6035-rebase
tacaswell May 30, 2016
374b6c0
TST: add small tolerances to streamplot tests
tacaswell May 31, 2016
ef49291
Merge pull request #6506 from tacaswell/tst_tolerance_on_streamplot
WeatherGod May 31, 2016
06dad9b
REL: v2.0.0b1
tacaswell May 31, 2016
d54ffdb
DOC: remove outdated or duplicate Windows documentation
cgohlke May 31, 2016
b1f4d68
DOC: Update Windows installation instructions
cgohlke May 31, 2016
4a0d01a
DOC: remove some absolute links in frontpage
cgohlke May 31, 2016
43ab6c2
DOC: more updates to Windows installation instructions
cgohlke May 31, 2016
ff7e408
DOC: fix links to examples
cgohlke May 31, 2016
5fbabdf
Merge pull request #6519 from paulromano/writeraw-fix
mdboom Jun 1, 2016
debac32
Merge pull request #6529 from afvincent/TST_avoid_calling_show_in_tes…
efiring Jun 2, 2016
9ebdaed
Merge pull request #6522 from phobson/yscales-bxp-demo
tacaswell Jun 3, 2016
1e35d8d
Merge pull request #6517 from anntzer/fix-string-gray-conversion
zblz Jun 3, 2016
4bf53ff
DOC: not all Sphinx builders support SVG
cgohlke Jun 3, 2016
99da366
DOC: add PNG logo
cgohlke Jun 3, 2016
a11bdc4
Use 4-space indent
cgohlke Jun 5, 2016
5c6295b
Use 4-space indent
cgohlke Jun 5, 2016
43d4c10
Merge pull request #6534 from cgohlke/patch-3
tacaswell Jun 5, 2016
ec276e2
Merge pull request #6532 from cgohlke/patch-2
tacaswell Jun 5, 2016
59e0ab9
Merge pull request #6014 from afvincent/afvincent-patch-issue-6009
tacaswell Jun 6, 2016
80c884a
Merge pull request #6464 from tacaswell/doc_annotation_docstrings
jenshnielsen Jun 6, 2016
972266d
Merge pull request #6508 from cgohlke/patch-1
tacaswell Jun 6, 2016
36d563b
Merge pull request #6505 from tacaswell/examples
jenshnielsen Jun 6, 2016
077c72e
Merge pull request #6544 from anntzer/margins-typo
WeatherGod Jun 7, 2016
8356fc2
Merge pull request #5626 from mdboom/new-icons
tacaswell Jun 8, 2016
1512593
Merge remote-tracking branch 'matplotlib/v1.5.x' into v2.x
jenshnielsen Jun 8, 2016
9cabdc6
Merge remote-tracking branch 'matplotlib/v2.x'
jenshnielsen Jun 8, 2016
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
Prev Previous commit
Next Next commit
Merge pull request #5626 from mdboom/new-icons
ENH: New toolbar icons
Conflicts:
	doc/users/navigation_toolbar.rst
	  - kept new wording
	lib/matplotlib/backends/backend_qt5.py
	  - wording + indentation change which is now correct
  • Loading branch information
tacaswell committed Jun 8, 2016
commit 8356fc216712496d85fe7fa5782aed87d0b049d5
Binary file modified doc/_static/toolbar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 12 additions & 16 deletions doc/users/navigation_toolbar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ All figure windows come with a navigation toolbar, which can be used
to navigate through the data set. Here is a description of each of
the buttons at the bottom of the toolbar

.. image:: ../../lib/matplotlib/mpl-data/images/home.png
.. image:: ../../lib/matplotlib/mpl-data/images/home_large.png

.. image:: ../../lib/matplotlib/mpl-data/images/back.png
.. image:: ../../lib/matplotlib/mpl-data/images/back_large.png

.. image:: ../../lib/matplotlib/mpl-data/images/forward.png
.. image:: ../../lib/matplotlib/mpl-data/images/forward_large.png

The ``Forward`` and ``Back`` buttons
These are akin to the web browser forward and back buttons. They
Expand All @@ -26,7 +26,7 @@ The ``Forward`` and ``Back`` buttons
``Back``, think web browser where data views are web pages. Use
the pan and zoom to rectangle to define new views.

.. image:: ../../lib/matplotlib/mpl-data/images/move.png
.. image:: ../../lib/matplotlib/mpl-data/images/move_large.png

The ``Pan/Zoom`` button
This button has two modes: pan and zoom. Click the toolbar button
Expand All @@ -50,7 +50,7 @@ The ``Pan/Zoom`` button
mouse button. The radius scale can be zoomed in and out using the
right mouse button.

.. image:: ../../lib/matplotlib/mpl-data/images/zoom_to_rect.png
.. image:: ../../lib/matplotlib/mpl-data/images/zoom_to_rect_large.png

The ``Zoom-to-rectangle`` button
Click this toolbar button to activate this mode. Put your mouse
Expand All @@ -61,14 +61,15 @@ The ``Zoom-to-rectangle`` button
with the right button, which will place your entire axes in the
region defined by the zoom out rectangle.

.. image:: ../../lib/matplotlib/mpl-data/images/subplots.png
.. image:: ../../lib/matplotlib/mpl-data/images/subplots_large.png

The ``Subplot-configuration`` button
Use this tool to configure the parameters of the subplot: the
left, right, top, bottom, space between the rows and space between
the columns.
Use this tool to configure the appearance of the subplot:
you can stretch or compress the left, right, top, or bottom
side of the subplot, or the space between the rows or
space between the columns.

.. image:: ../../lib/matplotlib/mpl-data/images/filesave.png
.. image:: ../../lib/matplotlib/mpl-data/images/filesave_large.png

The ``Save`` button
Click this button to launch a file save dialog. You can save
Expand All @@ -94,7 +95,7 @@ Zoom-to-rect **o**
Save **ctrl** + **s**
Toggle fullscreen **ctrl** + **f**
Close plot **ctrl** + **w**
Constrain pan/zoom to x axis hold **x** when panning/zooming with mouse
Constrain pan/zoom to x axis hold **x** when panning/zooming with mouse
Constrain pan/zoom to y axis hold **y** when panning/zooming with mouse
Preserve aspect ratio hold **CONTROL** when panning/zooming with mouse
Toggle grid **g** when mouse is over an axes
Expand Down Expand Up @@ -135,8 +136,3 @@ example code for GTK::

win.show_all()
gtk.main()





21 changes: 0 additions & 21 deletions examples/pylab_examples/matplotlib_icon.py

This file was deleted.

2 changes: 1 addition & 1 deletion lib/matplotlib/backend_bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -2732,8 +2732,8 @@ class NavigationToolbar2(object):
(None, None, None, None),
('Pan', 'Pan axes with left mouse, zoom with right', 'move', 'pan'),
('Zoom', 'Zoom to rectangle', 'zoom_to_rect', 'zoom'),
(None, None, None, None),
('Subplots', 'Configure subplots', 'subplots', 'configure_subplots'),
(None, None, None, None),
('Save', 'Save the figure', 'filesave', 'save_figure'),
)

Expand Down
3 changes: 1 addition & 2 deletions lib/matplotlib/backend_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,8 +870,7 @@ def _mouse_move(self, event):
"""Default tools"""

default_toolbar_tools = [['navigation', ['home', 'back', 'forward']],
['zoompan', ['pan', 'zoom']],
['layout', ['subplots']],
['zoompan', ['pan', 'zoom', 'subplots']],
['io', ['save']]]
"""Default tools in the toolbar"""

Expand Down
25 changes: 19 additions & 6 deletions lib/matplotlib/backends/backend_qt5.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
except ImportError:
figureoptions = None

from .qt_compat import QtCore, QtGui, QtWidgets, _getSaveFileName, __version__
from .qt_compat import (QtCore, QtGui, QtWidgets, _getSaveFileName,
__version__, is_pyqt5)
from matplotlib.backends.qt_editor.formsubplottool import UiSubplotTool

backend_version = __version__
Expand Down Expand Up @@ -142,6 +143,9 @@ def _create_qApp():
else:
qApp = app

if is_pyqt5():
qApp.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps)


class Show(ShowBase):
def mainloop(self):
Expand Down Expand Up @@ -567,6 +571,8 @@ def __init__(self, canvas, parent, coordinates=True):
NavigationToolbar2.__init__(self, canvas)

def _icon(self, name):
if is_pyqt5():
name = name.replace('.png', '_large.png')
return QtGui.QIcon(os.path.join(self.basedir, name))

def _init_toolbar(self):
Expand All @@ -583,11 +589,10 @@ def _init_toolbar(self):
a.setCheckable(True)
if tooltip_text is not None:
a.setToolTip(tooltip_text)

if figureoptions is not None:
a = self.addAction(self._icon("qt4_editor_options.png"),
'Customize', self.edit_parameters)
a.setToolTip('Edit curves line and axes parameters')
if figureoptions is not None and text == 'Subplots':
a = self.addAction(self._icon("qt4_editor_options.png"),
'Customize', self.edit_parameters)
a.setToolTip('Edit axis, curve and image parameters')

self.buttons = {}

Expand All @@ -607,6 +612,14 @@ def _init_toolbar(self):
# reference holder for subplots_adjust window
self.adj_window = None

# Esthetic adjustments - we need to set these explicitly in PyQt5
# otherwise the layout looks different - but we don't want to set it if
# not using HiDPI icons otherwise they look worse than before.
if is_pyqt5():
self.setIconSize(QtCore.QSize(24, 24))
self.layout().setSpacing(12)
self.setMinimumHeight(48)

if figureoptions is not None:
def edit_parameters(self):
allaxes = self.canvas.figure.get_axes()
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/backends/backend_tkagg.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def new_figure_manager_given_figure(num, figure):
# doesn't allow colour icons on linux systems, but tk >=8.5 has a iconphoto
# command which we call directly. Source:
# http://mail.python.org/pipermail/tkinter-discuss/2006-November/000954.html
icon_fname = os.path.join(rcParams['datapath'], 'images', 'matplotlib.gif')
icon_fname = os.path.join(rcParams['datapath'], 'images', 'matplotlib.ppm')
icon_img = Tk.PhotoImage(file=icon_fname)
try:
window.tk.call('wm', 'iconphoto', window._w, icon_img)
Expand Down
4 changes: 4 additions & 0 deletions lib/matplotlib/backends/qt_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,7 @@ def _getSaveFileName(*args, **kwargs):

'''
QtWidgets = QtGui


def is_pyqt5():
return QT_API == QT_API_PYQT5
Binary file modified lib/matplotlib/mpl-data/images/back.pdf
Binary file not shown.
Binary file modified lib/matplotlib/mpl-data/images/back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified lib/matplotlib/mpl-data/images/back.ppm
Binary file not shown.
109 changes: 46 additions & 63 deletions lib/matplotlib/mpl-data/images/back.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lib/matplotlib/mpl-data/images/back_large.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lib/matplotlib/mpl-data/images/back_large.ppm
Binary file not shown.
Binary file modified lib/matplotlib/mpl-data/images/filesave.pdf
Binary file not shown.
Binary file modified lib/matplotlib/mpl-data/images/filesave.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified lib/matplotlib/mpl-data/images/filesave.ppm
Binary file not shown.
Loading