diff --git a/doc/_static/toolbar.png b/doc/_static/toolbar.png index b63976bb3b2d..024ed625d2ca 100644 Binary files a/doc/_static/toolbar.png and b/doc/_static/toolbar.png differ diff --git a/doc/users/navigation_toolbar.rst b/doc/users/navigation_toolbar.rst index 8902873b9492..caa2387e0089 100644 --- a/doc/users/navigation_toolbar.rst +++ b/doc/users/navigation_toolbar.rst @@ -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 ``Home``, ``Forward`` and ``Back`` buttons These are akin to a web browser's home, forward and back controls. @@ -26,7 +26,7 @@ The ``Home``, ``Forward`` and ``Back`` buttons first, default view of your data. Again, all of these buttons should feel very familiar to any user of a web browser. -.. 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 @@ -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 @@ -61,15 +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 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 + 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 @@ -137,8 +137,3 @@ example code for GTK:: win.show_all() gtk.main() - - - - - diff --git a/examples/pylab_examples/matplotlib_icon.py b/examples/pylab_examples/matplotlib_icon.py deleted file mode 100644 index 50c70eedc2d5..000000000000 --- a/examples/pylab_examples/matplotlib_icon.py +++ /dev/null @@ -1,21 +0,0 @@ -""" -make the matplotlib svg minimization icon -""" -import matplotlib.pyplot as plt -import matplotlib -import numpy as np - -matplotlib.rc('grid', ls='-', lw=2, color='k') -fig = plt.figure(figsize=(1, 1), dpi=72) -plt.axes([0.025, 0.025, 0.95, 0.95], facecolor='#bfd1d4') - -t = np.arange(0, 2, 0.05) -s = np.sin(2*np.pi*t) -plt.plot(t, s, linewidth=4, color="#ca7900") -plt.axis([-.2, 2.2, -1.2, 1.2]) - -ax = plt.gca() -ax.set_xticklabels([]) -ax.set_yticklabels([]) - -plt.show() diff --git a/lib/matplotlib/backend_bases.py b/lib/matplotlib/backend_bases.py index 277a06b47a1b..cce7d1827160 100644 --- a/lib/matplotlib/backend_bases.py +++ b/lib/matplotlib/backend_bases.py @@ -2733,8 +2733,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'), ) diff --git a/lib/matplotlib/backend_tools.py b/lib/matplotlib/backend_tools.py index f57664883520..b86c966142af 100644 --- a/lib/matplotlib/backend_tools.py +++ b/lib/matplotlib/backend_tools.py @@ -924,8 +924,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""" diff --git a/lib/matplotlib/backends/backend_qt5.py b/lib/matplotlib/backends/backend_qt5.py index 8be5e263fb29..3c39d18a68ef 100644 --- a/lib/matplotlib/backends/backend_qt5.py +++ b/lib/matplotlib/backends/backend_qt5.py @@ -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__ @@ -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): @@ -581,6 +585,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): @@ -597,11 +603,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 axis, curve and image 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 = {} @@ -621,6 +626,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() diff --git a/lib/matplotlib/backends/backend_tkagg.py b/lib/matplotlib/backends/backend_tkagg.py index d57af42ceba5..45dca4be3804 100644 --- a/lib/matplotlib/backends/backend_tkagg.py +++ b/lib/matplotlib/backends/backend_tkagg.py @@ -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) diff --git a/lib/matplotlib/backends/qt_compat.py b/lib/matplotlib/backends/qt_compat.py index 728bd8ab7d0f..ee18036d3d8e 100644 --- a/lib/matplotlib/backends/qt_compat.py +++ b/lib/matplotlib/backends/qt_compat.py @@ -204,3 +204,7 @@ def _getSaveFileName(*args, **kwargs): ''' QtWidgets = QtGui + + +def is_pyqt5(): + return QT_API == QT_API_PYQT5 diff --git a/lib/matplotlib/mpl-data/images/back.pdf b/lib/matplotlib/mpl-data/images/back.pdf index e59cc0793d88..79709d8f435e 100644 Binary files a/lib/matplotlib/mpl-data/images/back.pdf and b/lib/matplotlib/mpl-data/images/back.pdf differ diff --git a/lib/matplotlib/mpl-data/images/back.png b/lib/matplotlib/mpl-data/images/back.png index c23e1b5570f0..e3c4b5815487 100644 Binary files a/lib/matplotlib/mpl-data/images/back.png and b/lib/matplotlib/mpl-data/images/back.png differ diff --git a/lib/matplotlib/mpl-data/images/back.ppm b/lib/matplotlib/mpl-data/images/back.ppm index 7d576e7e6cc1..a476925cde60 100644 Binary files a/lib/matplotlib/mpl-data/images/back.ppm and b/lib/matplotlib/mpl-data/images/back.ppm differ diff --git a/lib/matplotlib/mpl-data/images/back.svg b/lib/matplotlib/mpl-data/images/back.svg index 0cb250ab224a..a933ef8cdf50 100755 --- a/lib/matplotlib/mpl-data/images/back.svg +++ b/lib/matplotlib/mpl-data/images/back.svg @@ -1,63 +1,46 @@ - - -]> - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + diff --git a/lib/matplotlib/mpl-data/images/back_large.png b/lib/matplotlib/mpl-data/images/back_large.png new file mode 100644 index 000000000000..e44a70a9cd23 Binary files /dev/null and b/lib/matplotlib/mpl-data/images/back_large.png differ diff --git a/lib/matplotlib/mpl-data/images/back_large.ppm b/lib/matplotlib/mpl-data/images/back_large.ppm new file mode 100644 index 000000000000..e79d3610bd52 Binary files /dev/null and b/lib/matplotlib/mpl-data/images/back_large.ppm differ diff --git a/lib/matplotlib/mpl-data/images/filesave.pdf b/lib/matplotlib/mpl-data/images/filesave.pdf index df31f32de46b..794a1152f602 100644 Binary files a/lib/matplotlib/mpl-data/images/filesave.pdf and b/lib/matplotlib/mpl-data/images/filesave.pdf differ diff --git a/lib/matplotlib/mpl-data/images/filesave.png b/lib/matplotlib/mpl-data/images/filesave.png index 790182194238..919e40bf5829 100644 Binary files a/lib/matplotlib/mpl-data/images/filesave.png and b/lib/matplotlib/mpl-data/images/filesave.png differ diff --git a/lib/matplotlib/mpl-data/images/filesave.ppm b/lib/matplotlib/mpl-data/images/filesave.ppm index f6f3b87ef110..02eb3c84bce0 100644 Binary files a/lib/matplotlib/mpl-data/images/filesave.ppm and b/lib/matplotlib/mpl-data/images/filesave.ppm differ diff --git a/lib/matplotlib/mpl-data/images/filesave.svg b/lib/matplotlib/mpl-data/images/filesave.svg index cf09550efe98..ad8372d295de 100755 --- a/lib/matplotlib/mpl-data/images/filesave.svg +++ b/lib/matplotlib/mpl-data/images/filesave.svg @@ -1,450 +1,68 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/lib/matplotlib/mpl-data/images/filesave_large.png b/lib/matplotlib/mpl-data/images/filesave_large.png new file mode 100644 index 000000000000..a39b55a6166b Binary files /dev/null and b/lib/matplotlib/mpl-data/images/filesave_large.png differ diff --git a/lib/matplotlib/mpl-data/images/filesave_large.ppm b/lib/matplotlib/mpl-data/images/filesave_large.ppm new file mode 100644 index 000000000000..e2cc82eea9ba Binary files /dev/null and b/lib/matplotlib/mpl-data/images/filesave_large.ppm differ diff --git a/lib/matplotlib/mpl-data/images/forward.pdf b/lib/matplotlib/mpl-data/images/forward.pdf index 98b75ffbdc74..ce4a1bcb1321 100644 Binary files a/lib/matplotlib/mpl-data/images/forward.pdf and b/lib/matplotlib/mpl-data/images/forward.pdf differ diff --git a/lib/matplotlib/mpl-data/images/forward.png b/lib/matplotlib/mpl-data/images/forward.png index 9d712c5e35bb..59400feb49df 100644 Binary files a/lib/matplotlib/mpl-data/images/forward.png and b/lib/matplotlib/mpl-data/images/forward.png differ diff --git a/lib/matplotlib/mpl-data/images/forward.ppm b/lib/matplotlib/mpl-data/images/forward.ppm index 41263e9cb402..91f30c326070 100644 Binary files a/lib/matplotlib/mpl-data/images/forward.ppm and b/lib/matplotlib/mpl-data/images/forward.ppm differ diff --git a/lib/matplotlib/mpl-data/images/forward.svg b/lib/matplotlib/mpl-data/images/forward.svg index 3f7909388920..1f4071360680 100755 --- a/lib/matplotlib/mpl-data/images/forward.svg +++ b/lib/matplotlib/mpl-data/images/forward.svg @@ -1,63 +1,46 @@ - - -]> - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + diff --git a/lib/matplotlib/mpl-data/images/forward_large.png b/lib/matplotlib/mpl-data/images/forward_large.png new file mode 100644 index 000000000000..de65815bba20 Binary files /dev/null and b/lib/matplotlib/mpl-data/images/forward_large.png differ diff --git a/lib/matplotlib/mpl-data/images/forward_large.ppm b/lib/matplotlib/mpl-data/images/forward_large.ppm new file mode 100644 index 000000000000..937ece22e1fa Binary files /dev/null and b/lib/matplotlib/mpl-data/images/forward_large.ppm differ diff --git a/lib/matplotlib/mpl-data/images/home.pdf b/lib/matplotlib/mpl-data/images/home.pdf index 65b9c6ca2d2e..f9c6439b9b84 100644 Binary files a/lib/matplotlib/mpl-data/images/home.pdf and b/lib/matplotlib/mpl-data/images/home.pdf differ diff --git a/lib/matplotlib/mpl-data/images/home.png b/lib/matplotlib/mpl-data/images/home.png index bed4ffda4a1c..6e5fdebb357c 100644 Binary files a/lib/matplotlib/mpl-data/images/home.png and b/lib/matplotlib/mpl-data/images/home.png differ diff --git a/lib/matplotlib/mpl-data/images/home.ppm b/lib/matplotlib/mpl-data/images/home.ppm index fbb37b2342d8..a76518e47733 100644 Binary files a/lib/matplotlib/mpl-data/images/home.ppm and b/lib/matplotlib/mpl-data/images/home.ppm differ diff --git a/lib/matplotlib/mpl-data/images/home.svg b/lib/matplotlib/mpl-data/images/home.svg index 34d1966625cc..3c4ccce3ed1f 100755 --- a/lib/matplotlib/mpl-data/images/home.svg +++ b/lib/matplotlib/mpl-data/images/home.svg @@ -1,336 +1,59 @@ - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + diff --git a/lib/matplotlib/mpl-data/images/home_large.png b/lib/matplotlib/mpl-data/images/home_large.png new file mode 100644 index 000000000000..3357bfeb9011 Binary files /dev/null and b/lib/matplotlib/mpl-data/images/home_large.png differ diff --git a/lib/matplotlib/mpl-data/images/home_large.ppm b/lib/matplotlib/mpl-data/images/home_large.ppm new file mode 100644 index 000000000000..6588666a82ba Binary files /dev/null and b/lib/matplotlib/mpl-data/images/home_large.ppm differ diff --git a/lib/matplotlib/mpl-data/images/matplotlib.gif b/lib/matplotlib/mpl-data/images/matplotlib.gif deleted file mode 100644 index 202bd81c2921..000000000000 Binary files a/lib/matplotlib/mpl-data/images/matplotlib.gif and /dev/null differ diff --git a/lib/matplotlib/mpl-data/images/matplotlib.pdf b/lib/matplotlib/mpl-data/images/matplotlib.pdf index 86d4fd115d79..6c44566ad819 100644 Binary files a/lib/matplotlib/mpl-data/images/matplotlib.pdf and b/lib/matplotlib/mpl-data/images/matplotlib.pdf differ diff --git a/lib/matplotlib/mpl-data/images/matplotlib.png b/lib/matplotlib/mpl-data/images/matplotlib.png index 458b921b9724..8eedfa7cc8fc 100644 Binary files a/lib/matplotlib/mpl-data/images/matplotlib.png and b/lib/matplotlib/mpl-data/images/matplotlib.png differ diff --git a/lib/matplotlib/mpl-data/images/matplotlib.ppm b/lib/matplotlib/mpl-data/images/matplotlib.ppm new file mode 100644 index 000000000000..70856465af54 Binary files /dev/null and b/lib/matplotlib/mpl-data/images/matplotlib.ppm differ diff --git a/lib/matplotlib/mpl-data/images/matplotlib.svg b/lib/matplotlib/mpl-data/images/matplotlib.svg index c121c6dff2a4..95d1b61203bf 100644 --- a/lib/matplotlib/mpl-data/images/matplotlib.svg +++ b/lib/matplotlib/mpl-data/images/matplotlib.svg @@ -1,76 +1,3171 @@ - - - - - - - image/svg+xml - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/matplotlib/mpl-data/images/matplotlib_large.png b/lib/matplotlib/mpl-data/images/matplotlib_large.png new file mode 100644 index 000000000000..c7dcfe6cb825 Binary files /dev/null and b/lib/matplotlib/mpl-data/images/matplotlib_large.png differ diff --git a/lib/matplotlib/mpl-data/images/matplotlib_large.ppm b/lib/matplotlib/mpl-data/images/matplotlib_large.ppm new file mode 100644 index 000000000000..a52c6b4bb90a Binary files /dev/null and b/lib/matplotlib/mpl-data/images/matplotlib_large.ppm differ diff --git a/lib/matplotlib/mpl-data/images/move.pdf b/lib/matplotlib/mpl-data/images/move.pdf index fafaca3a7d9b..d883d9224a6e 100644 Binary files a/lib/matplotlib/mpl-data/images/move.pdf and b/lib/matplotlib/mpl-data/images/move.pdf differ diff --git a/lib/matplotlib/mpl-data/images/move.png b/lib/matplotlib/mpl-data/images/move.png index a42024d0d15a..4fbbaef41bba 100644 Binary files a/lib/matplotlib/mpl-data/images/move.png and b/lib/matplotlib/mpl-data/images/move.png differ diff --git a/lib/matplotlib/mpl-data/images/move.ppm b/lib/matplotlib/mpl-data/images/move.ppm index 7197f886d888..d743b8700ca8 100644 Binary files a/lib/matplotlib/mpl-data/images/move.ppm and b/lib/matplotlib/mpl-data/images/move.ppm differ diff --git a/lib/matplotlib/mpl-data/images/move.svg b/lib/matplotlib/mpl-data/images/move.svg index 2b84efc3672d..aa7198cf72df 100755 --- a/lib/matplotlib/mpl-data/images/move.svg +++ b/lib/matplotlib/mpl-data/images/move.svg @@ -1,176 +1,73 @@ - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/lib/matplotlib/mpl-data/images/move_large.png b/lib/matplotlib/mpl-data/images/move_large.png new file mode 100644 index 000000000000..96351c115f0b Binary files /dev/null and b/lib/matplotlib/mpl-data/images/move_large.png differ diff --git a/lib/matplotlib/mpl-data/images/move_large.ppm b/lib/matplotlib/mpl-data/images/move_large.ppm new file mode 100644 index 000000000000..e5fb80a0cc4b Binary files /dev/null and b/lib/matplotlib/mpl-data/images/move_large.ppm differ diff --git a/lib/matplotlib/mpl-data/images/qt4_editor_options.pdf b/lib/matplotlib/mpl-data/images/qt4_editor_options.pdf index 218c830606aa..a92f2cc3aaee 100644 Binary files a/lib/matplotlib/mpl-data/images/qt4_editor_options.pdf and b/lib/matplotlib/mpl-data/images/qt4_editor_options.pdf differ diff --git a/lib/matplotlib/mpl-data/images/qt4_editor_options.png b/lib/matplotlib/mpl-data/images/qt4_editor_options.png index 8074e1de692d..792ec81244e3 100644 Binary files a/lib/matplotlib/mpl-data/images/qt4_editor_options.png and b/lib/matplotlib/mpl-data/images/qt4_editor_options.png differ diff --git a/lib/matplotlib/mpl-data/images/qt4_editor_options.ppm b/lib/matplotlib/mpl-data/images/qt4_editor_options.ppm new file mode 100644 index 000000000000..44a6764650c8 Binary files /dev/null and b/lib/matplotlib/mpl-data/images/qt4_editor_options.ppm differ diff --git a/lib/matplotlib/mpl-data/images/qt4_editor_options.svg b/lib/matplotlib/mpl-data/images/qt4_editor_options.svg index b0d5c3186e4f..0b46bf80923e 100644 --- a/lib/matplotlib/mpl-data/images/qt4_editor_options.svg +++ b/lib/matplotlib/mpl-data/images/qt4_editor_options.svg @@ -1,106 +1,48 @@ - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - + + + + + + + + + + + + + + diff --git a/lib/matplotlib/mpl-data/images/qt4_editor_options_large.png b/lib/matplotlib/mpl-data/images/qt4_editor_options_large.png new file mode 100644 index 000000000000..46d52c91c9bf Binary files /dev/null and b/lib/matplotlib/mpl-data/images/qt4_editor_options_large.png differ diff --git a/lib/matplotlib/mpl-data/images/qt4_editor_options_large.ppm b/lib/matplotlib/mpl-data/images/qt4_editor_options_large.ppm new file mode 100644 index 000000000000..95f62df3a8f3 Binary files /dev/null and b/lib/matplotlib/mpl-data/images/qt4_editor_options_large.ppm differ diff --git a/lib/matplotlib/mpl-data/images/stock_close.ppm b/lib/matplotlib/mpl-data/images/stock_close.ppm deleted file mode 100644 index cf8c67da9979..000000000000 Binary files a/lib/matplotlib/mpl-data/images/stock_close.ppm and /dev/null differ diff --git a/lib/matplotlib/mpl-data/images/stock_close.xpm b/lib/matplotlib/mpl-data/images/stock_close.xpm deleted file mode 100644 index 005ce14dbf37..000000000000 --- a/lib/matplotlib/mpl-data/images/stock_close.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static char * stock_close_xpm[] = { -"16 16 2 1", -" g None", -". g #000000", -" ", -" ", -" . . ", -" . ... ", -" .. .... ", -" .. ... ", -" ..... ", -" ... ", -" ..... ", -" ....... ", -" ... .... ", -" ... .... ", -" ... .. ", -" ", -" ", -" "}; diff --git a/lib/matplotlib/mpl-data/images/stock_down.ppm b/lib/matplotlib/mpl-data/images/stock_down.ppm deleted file mode 100644 index 7d7087cb680b..000000000000 Binary files a/lib/matplotlib/mpl-data/images/stock_down.ppm and /dev/null differ diff --git a/lib/matplotlib/mpl-data/images/stock_down.xpm b/lib/matplotlib/mpl-data/images/stock_down.xpm deleted file mode 100644 index 26d0c28ab927..000000000000 --- a/lib/matplotlib/mpl-data/images/stock_down.xpm +++ /dev/null @@ -1,44 +0,0 @@ -/* XPM */ -static char * stock_down_xpm[] = { -"16 16 25 1", -" c None", -". c #000000", -"+ c #B5C9DC", -"@ c #9BB6D0", -"# c #91B0CC", -"$ c #49749C", -"% c #456F96", -"& c #AFC5DA", -"* c #A0BAD3", -"= c #9EB8D1", -"- c #3F6588", -"; c #375978", -"> c #B2C7DB", -", c #9CB7D1", -"' c #9AB5CF", -") c #B6CADD", -"! c #5B88B2", -"~ c #A4BDD5", -"{ c #2A435B", -"] c #5080AD", -"^ c #97B3CE", -"/ c #080D11", -"( c #5F8BB4", -"_ c #95B2CE", -": c #4C79A3", -" ", -" ", -" ....... ", -" .+@#$%. ", -" .&*=-;. ", -" .>,'-;. ", -" .),'-;. ", -" .)@@-;. ", -" ....)',-;.... ", -" .!=~*,---{. ", -" .],,,--{. ", -" .]^*-{. ", -" /(_{. ", -" .:. ", -" . ", -" "}; diff --git a/lib/matplotlib/mpl-data/images/stock_left.ppm b/lib/matplotlib/mpl-data/images/stock_left.ppm deleted file mode 100644 index 4b693b2c039d..000000000000 Binary files a/lib/matplotlib/mpl-data/images/stock_left.ppm and /dev/null differ diff --git a/lib/matplotlib/mpl-data/images/stock_left.xpm b/lib/matplotlib/mpl-data/images/stock_left.xpm deleted file mode 100644 index 503bc36616e2..000000000000 --- a/lib/matplotlib/mpl-data/images/stock_left.xpm +++ /dev/null @@ -1,45 +0,0 @@ -/* XPM */ -static char * stock_left_xpm[] = { -"16 16 26 1", -" c None", -". c #000000", -"+ c #C4D4E3", -"@ c #A3BCD4", -"# c #A6BED5", -"$ c #AAC1D7", -"% c #ABC2D8", -"& c #AFC5DA", -"* c #AEC4D9", -"= c #6892B9", -"- c #9CB7D1", -"; c #A4BDD5", -"> c #9FB9D2", -", c #9BB6D0", -"' c #9AB5CF", -") c #49759E", -"! c #1C2D3D", -"~ c #C5D5E4", -"{ c #A0BAD3", -"] c #9EB8D1", -"^ c #4B78A2", -"/ c #2A435B", -"( c #3F6588", -"_ c #34536F", -": c #29425A", -"< c #2D4760", -" ", -" . ", -" .. ", -" .+. ", -" .+@....... ", -" .+#$%&%*@=. ", -" .+-;@>,,>'). ", -" !~>{]]->>>>^. ", -" ./((((((((_. ", -" ./((:::::<. ", -" ./(....... ", -" ./. ", -" .. ", -" . ", -" ", -" "}; diff --git a/lib/matplotlib/mpl-data/images/stock_refresh.ppm b/lib/matplotlib/mpl-data/images/stock_refresh.ppm deleted file mode 100644 index ef37f173e90c..000000000000 Binary files a/lib/matplotlib/mpl-data/images/stock_refresh.ppm and /dev/null differ diff --git a/lib/matplotlib/mpl-data/images/stock_refresh.xpm b/lib/matplotlib/mpl-data/images/stock_refresh.xpm deleted file mode 100644 index 1659cff3dd52..000000000000 --- a/lib/matplotlib/mpl-data/images/stock_refresh.xpm +++ /dev/null @@ -1,35 +0,0 @@ -/* XPM */ -static char * stock_refresh_xpm[] = { -"16 16 16 1", -" c None", -". c #000000", -"+ c #8FA8BE", -"@ c #D5DEE6", -"# c #BBCBD8", -"$ c #A6BACB", -"% c #A2B7C9", -"& c #83A0B8", -"* c #7393AE", -"= c #4F6F8A", -"- c #48667F", -"; c #92ABC0", -"> c #33485A", -", c #22303B", -"' c #7897B1", -") c #4B6A84", -" ", -" . ", -" ..+. ", -" .@#$%. ", -" .&*==-. ", -" .;>.,. ", -" .'. . . ", -" .). .. ", -" .. .@. ", -" . . .=. ", -" .@.>=. ", -" .@===>. ", -" .'=>>. ", -" .'.. ", -" . ", -" "}; diff --git a/lib/matplotlib/mpl-data/images/stock_right.ppm b/lib/matplotlib/mpl-data/images/stock_right.ppm deleted file mode 100644 index eaa9b28528f5..000000000000 Binary files a/lib/matplotlib/mpl-data/images/stock_right.ppm and /dev/null differ diff --git a/lib/matplotlib/mpl-data/images/stock_right.xpm b/lib/matplotlib/mpl-data/images/stock_right.xpm deleted file mode 100644 index f63c1d34051b..000000000000 --- a/lib/matplotlib/mpl-data/images/stock_right.xpm +++ /dev/null @@ -1,44 +0,0 @@ -/* XPM */ -static char * stock_right_xpm[] = { -"16 16 25 1", -" c None", -". c #000000", -"+ c #5B88B2", -"@ c #9EB8D1", -"# c #5080AD", -"$ c #B5C9DC", -"% c #AFC5DA", -"& c #B2C7DB", -"* c #B6CADD", -"= c #A4BDD5", -"- c #9CB7D1", -"; c #080D11", -"> c #9BB6D0", -", c #A0BAD3", -"' c #9AB5CF", -") c #97B3CE", -"! c #5F8BB4", -"~ c #91B0CC", -"{ c #95B2CE", -"] c #4C79A3", -"^ c #49749C", -"/ c #3F6588", -"( c #2A435B", -"_ c #456F96", -": c #375978", -" ", -" . ", -" .. ", -" .+. ", -" .......@#. ", -" .$%&***=-#; ", -" .>,-->',-)!. ", -" .~@''>---,{]. ", -" .^////////(. ", -" ._::::://(. ", -" ......./(. ", -" .(. ", -" .. ", -" . ", -" ", -" "}; diff --git a/lib/matplotlib/mpl-data/images/stock_save_as.ppm b/lib/matplotlib/mpl-data/images/stock_save_as.ppm deleted file mode 100644 index aec0a9478474..000000000000 Binary files a/lib/matplotlib/mpl-data/images/stock_save_as.ppm and /dev/null differ diff --git a/lib/matplotlib/mpl-data/images/stock_save_as.xpm b/lib/matplotlib/mpl-data/images/stock_save_as.xpm deleted file mode 100644 index 0981c7c57c61..000000000000 --- a/lib/matplotlib/mpl-data/images/stock_save_as.xpm +++ /dev/null @@ -1,130 +0,0 @@ -/* XPM */ -static char * stock_save_as_xpm[] = { -"16 16 111 2", -" c None", -". c #000000", -"+ c #F7F8FA", -"@ c #CBDDEB", -"# c #C88A80", -"$ c #D18F84", -"% c #CF8D82", -"& c #A49626", -"* c #634A1E", -"= c #A8BBCC", -"- c #BFD5E8", -"; c #DBE7F1", -"> c #8DA9BE", -", c #B7877E", -"' c #C77568", -") c #C77467", -"! c #C57366", -"~ c #FCEB3D", -"{ c #F7B544", -"] c #61522E", -"^ c #72899A", -"/ c #54697C", -"( c #CFE0ED", -"_ c #D7D7D7", -": c #FEFEFE", -"< c #FCFCFC", -"[ c #F9DF39", -"} c #F7B545", -"| c #6C5F34", -"1 c #B4B4B4", -"2 c #84A0B5", -"3 c #4F6475", -"4 c #D6D6D6", -"5 c #F8D837", -"6 c #EFB44D", -"7 c #584D2B", -"8 c #8F8F8F", -"9 c #F1F1F1", -"0 c #819AAE", -"a c #496072", -"b c #FDFDFD", -"c c #F6D236", -"d c #EDA43E", -"e c #584E2B", -"f c #AAAAAA", -"g c #D3D3D3", -"h c #485F71", -"i c #D5D5D5", -"j c #D7AE74", -"k c #61562F", -"l c #737373", -"m c #C5C5C5", -"n c #B0B0B0", -"o c #7F98AC", -"p c #EDEDED", -"q c #4F4115", -"r c #8D8D8D", -"s c #EBEBEB", -"t c #ECECEC", -"u c #ACBDCB", -"v c #6F767D", -"w c #9AA3AC", -"x c #BFCBD6", -"y c #BDC9D4", -"z c #A1B6C4", -"A c #8BA7BC", -"B c #809CB0", -"C c #6C8394", -"D c #7D97AB", -"E c #7D97AC", -"F c #A4ACB8", -"G c #B9B9B9", -"H c #C7C7C7", -"I c #E1E1E1", -"J c #D4D4D4", -"K c #9C9D9D", -"L c #2F4656", -"M c #80868C", -"N c #183042", -"O c #33495A", -"P c #132D3C", -"Q c #586D80", -"R c #97A5B0", -"S c #86A4B9", -"T c #CDCDCD", -"U c #2E4353", -"V c #5A7082", -"W c #BFBFBF", -"X c #112835", -"Y c #9DA9B0", -"Z c #6B7882", -"` c #829DB1", -" . c #CBCBCB", -".. c #E5E5E5", -"+. c #213648", -"@. c #5F7989", -"#. c #C2C2C2", -"$. c #B2B2B2", -"%. c #112C3A", -"&. c #9FA9B0", -"*. c #59636D", -"=. c #A1A1A1", -"-. c #C0C0C0", -";. c #909090", -">. c #868686", -",. c #6E6E6E", -"'. c #7A7A7A", -"). c #2D3949", -"!. c #3E4F5C", -"~. c #80878F", -"{. c #1A3140", -" . . . . . . . . . . . . . . ", -". + @ # $ $ $ $ % . & * . = - . ", -". ; > , ' ) ) ! . ~ { ] . ^ / . ", -". ( > _ : : < . [ } | . 1 2 3 . ", -". ( > _ _ 4 . 5 6 7 . 8 9 0 a . ", -". ( > _ b . c d e . f g 9 0 h . ", -". ( > _ i . j k . l m n 9 o a . ", -". ( > p . q . . r g s s t 0 a . ", -". ( > u . . v w x x x y z 0 a . ", -". ( > A B C 0 0 0 0 D E 0 0 a . ", -". ( > A F G G H I J K L M 0 a . ", -". ( > 2 m m N O i m G P Q R a . ", -". ( S 0 m T U V m m W X V Y a . ", -". Z ` o ...+.@.m #.$.%.V &.a . ", -". . *.3 =.-.;.;.>.,.'.).!.~.{.. ", -" . . . . . . . . . . . . . . "}; diff --git a/lib/matplotlib/mpl-data/images/stock_up.ppm b/lib/matplotlib/mpl-data/images/stock_up.ppm deleted file mode 100644 index 0557a6f9efc7..000000000000 Binary files a/lib/matplotlib/mpl-data/images/stock_up.ppm and /dev/null differ diff --git a/lib/matplotlib/mpl-data/images/stock_up.xpm b/lib/matplotlib/mpl-data/images/stock_up.xpm deleted file mode 100644 index 994623624c88..000000000000 --- a/lib/matplotlib/mpl-data/images/stock_up.xpm +++ /dev/null @@ -1,45 +0,0 @@ -/* XPM */ -static char * stock_up_xpm[] = { -"16 16 26 1", -" c None", -". c #1C2D3D", -"+ c #000000", -"@ c #C5D5E4", -"# c #C4D4E3", -"$ c #9FB9D2", -"% c #2A435B", -"& c #9CB7D1", -"* c #A0BAD3", -"= c #3F6588", -"- c #A6BED5", -"; c #A4BDD5", -"> c #9EB8D1", -", c #A3BCD4", -"' c #AAC1D7", -") c #ABC2D8", -"! c #29425A", -"~ c #AFC5DA", -"{ c #9BB6D0", -"] c #AEC4D9", -"^ c #9AB5CF", -"/ c #6892B9", -"( c #49759E", -"_ c #4B78A2", -": c #34536F", -"< c #2D4760", -" ", -" . ", -" +@+ ", -" +#$%+ ", -" +#&*=%+ ", -" +#-;>==%+ ", -" +#,',>===%+ ", -" ++++)$&=!++++ ", -" +~{$=!+ ", -" +){$=!+ ", -" +]$$=!+ ", -" +,^$=!+ ", -" +/(_:<+ ", -" +++++++ ", -" ", -" "}; diff --git a/lib/matplotlib/mpl-data/images/stock_zoom-in.ppm b/lib/matplotlib/mpl-data/images/stock_zoom-in.ppm deleted file mode 100644 index 094b8308d2b3..000000000000 Binary files a/lib/matplotlib/mpl-data/images/stock_zoom-in.ppm and /dev/null differ diff --git a/lib/matplotlib/mpl-data/images/stock_zoom-in.xpm b/lib/matplotlib/mpl-data/images/stock_zoom-in.xpm deleted file mode 100644 index 349e87e73200..000000000000 --- a/lib/matplotlib/mpl-data/images/stock_zoom-in.xpm +++ /dev/null @@ -1,61 +0,0 @@ -/* XPM */ -static char * stock_zoom_in_xpm[] = { -"16 16 42 1", -" c None", -". c #000000", -"+ c #262626", -"@ c #C5C5C5", -"# c #EEEEEE", -"$ c #EDEDED", -"% c #ABABAB", -"& c #464646", -"* c #878787", -"= c #F1F1F1", -"- c #FEFEFE", -"; c #FDFDFD", -"> c #FCFCFC", -", c #EAEAEA", -"' c #707070", -") c #252525", -"! c #282828", -"~ c #FBFBFB", -"{ c #E8E8E8", -"] c #B0B0B0", -"^ c #FFFFFF", -"/ c #050505", -"( c #040404", -"_ c #FAFAFA", -": c #A4A4A4", -"< c #090909", -"[ c #242424", -"} c #E5E5E5", -"| c #E4E4E4", -"1 c #F9F9F9", -"2 c #BABABA", -"3 c #E7E7E7", -"4 c #858585", -"5 c #E3E3E3", -"6 c #6D6D6D", -"7 c #A1A1A1", -"8 c #202020", -"9 c #686868", -"0 c #343434", -"a c #797979", -"b c #3A3A3A", -"c c #1F1F1F", -" .... ", -" .+@#$%&. ", -" .*=--;>,'. ", -" &=--)!;~{& ", -".]--^/(;>_:. ", -".#-//<(([_}. ", -".$;[(../[_|. ", -".%>;;((~_12. ", -" &,~><)_13& ", -" .4{___156. ", -" .&:}|7&.... ", -" .... 88.. ", -" .90.. ", -" .ab..", -" .9c.", -" .. "}; diff --git a/lib/matplotlib/mpl-data/images/stock_zoom-out.ppm b/lib/matplotlib/mpl-data/images/stock_zoom-out.ppm deleted file mode 100644 index b108cd8bb9f3..000000000000 Binary files a/lib/matplotlib/mpl-data/images/stock_zoom-out.ppm and /dev/null differ diff --git a/lib/matplotlib/mpl-data/images/stock_zoom-out.xpm b/lib/matplotlib/mpl-data/images/stock_zoom-out.xpm deleted file mode 100644 index a9d479124a67..000000000000 --- a/lib/matplotlib/mpl-data/images/stock_zoom-out.xpm +++ /dev/null @@ -1,59 +0,0 @@ -/* XPM */ -static char * stock_zoom_out_xpm[] = { -"16 16 40 1", -" c None", -". c #000000", -"+ c #262626", -"@ c #C5C5C5", -"# c #EEEEEE", -"$ c #EDEDED", -"% c #ABABAB", -"& c #464646", -"* c #878787", -"= c #F1F1F1", -"- c #FEFEFE", -"; c #FDFDFD", -"> c #FCFCFC", -", c #EAEAEA", -"' c #707070", -") c #FBFBFB", -"! c #E8E8E8", -"~ c #B0B0B0", -"{ c #FFFFFF", -"] c #FAFAFA", -"^ c #A4A4A4", -"/ c #050505", -"( c #090909", -"_ c #040404", -": c #242424", -"< c #E5E5E5", -"[ c #E4E4E4", -"} c #F9F9F9", -"| c #BABABA", -"1 c #E7E7E7", -"2 c #858585", -"3 c #E3E3E3", -"4 c #6D6D6D", -"5 c #A1A1A1", -"6 c #202020", -"7 c #686868", -"8 c #343434", -"9 c #797979", -"0 c #3A3A3A", -"a c #1F1F1F", -" .... ", -" .+@#$%&. ", -" .*=--;>,'. ", -" &=----;)!& ", -".~--{--;>]^. ", -".#-//(__:]<. ", -".$;:_../:][. ", -".%>;;;>)]}|. ", -" &,)>))]}1& ", -" .2!]]]}34. ", -" .&^<[5&.... ", -" .... 66.. ", -" .78.. ", -" .90..", -" .7a.", -" .. "}; diff --git a/lib/matplotlib/mpl-data/images/subplots.pdf b/lib/matplotlib/mpl-data/images/subplots.pdf index ae9e4817ca5a..f404665579a0 100644 Binary files a/lib/matplotlib/mpl-data/images/subplots.pdf and b/lib/matplotlib/mpl-data/images/subplots.pdf differ diff --git a/lib/matplotlib/mpl-data/images/subplots.png b/lib/matplotlib/mpl-data/images/subplots.png index 266452c5d9ae..bb0318c40e72 100644 Binary files a/lib/matplotlib/mpl-data/images/subplots.png and b/lib/matplotlib/mpl-data/images/subplots.png differ diff --git a/lib/matplotlib/mpl-data/images/subplots.ppm b/lib/matplotlib/mpl-data/images/subplots.ppm index 1edfce3c345c..37d3bb29570f 100644 Binary files a/lib/matplotlib/mpl-data/images/subplots.ppm and b/lib/matplotlib/mpl-data/images/subplots.ppm differ diff --git a/lib/matplotlib/mpl-data/images/subplots.svg b/lib/matplotlib/mpl-data/images/subplots.svg index f8ab0444e7fd..e87d2c9b1b19 100644 --- a/lib/matplotlib/mpl-data/images/subplots.svg +++ b/lib/matplotlib/mpl-data/images/subplots.svg @@ -1,83 +1,81 @@ - - - -image/svg+xml \ No newline at end of file + + + + + + + + + + + + + + + + diff --git a/lib/matplotlib/mpl-data/images/subplots_large.png b/lib/matplotlib/mpl-data/images/subplots_large.png new file mode 100644 index 000000000000..4440af1759ee Binary files /dev/null and b/lib/matplotlib/mpl-data/images/subplots_large.png differ diff --git a/lib/matplotlib/mpl-data/images/subplots_large.ppm b/lib/matplotlib/mpl-data/images/subplots_large.ppm new file mode 100644 index 000000000000..c80f54964773 Binary files /dev/null and b/lib/matplotlib/mpl-data/images/subplots_large.ppm differ diff --git a/lib/matplotlib/mpl-data/images/zoom_to_rect.pdf b/lib/matplotlib/mpl-data/images/zoom_to_rect.pdf index e658bd929029..22add33bb8f9 100644 Binary files a/lib/matplotlib/mpl-data/images/zoom_to_rect.pdf and b/lib/matplotlib/mpl-data/images/zoom_to_rect.pdf differ diff --git a/lib/matplotlib/mpl-data/images/zoom_to_rect.png b/lib/matplotlib/mpl-data/images/zoom_to_rect.png index 07236a9ff811..12afa252481c 100644 Binary files a/lib/matplotlib/mpl-data/images/zoom_to_rect.png and b/lib/matplotlib/mpl-data/images/zoom_to_rect.png differ diff --git a/lib/matplotlib/mpl-data/images/zoom_to_rect.ppm b/lib/matplotlib/mpl-data/images/zoom_to_rect.ppm index 7dd401e37cfe..a825cb771b84 100644 Binary files a/lib/matplotlib/mpl-data/images/zoom_to_rect.ppm and b/lib/matplotlib/mpl-data/images/zoom_to_rect.ppm differ diff --git a/lib/matplotlib/mpl-data/images/zoom_to_rect.svg b/lib/matplotlib/mpl-data/images/zoom_to_rect.svg index 5948554f12b6..f4b69b23c5eb 100755 --- a/lib/matplotlib/mpl-data/images/zoom_to_rect.svg +++ b/lib/matplotlib/mpl-data/images/zoom_to_rect.svg @@ -1,227 +1,40 @@ - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - \ No newline at end of file + + + + + diff --git a/lib/matplotlib/mpl-data/images/zoom_to_rect_large.png b/lib/matplotlib/mpl-data/images/zoom_to_rect_large.png new file mode 100644 index 000000000000..5963603bb681 Binary files /dev/null and b/lib/matplotlib/mpl-data/images/zoom_to_rect_large.png differ diff --git a/lib/matplotlib/mpl-data/images/zoom_to_rect_large.ppm b/lib/matplotlib/mpl-data/images/zoom_to_rect_large.ppm new file mode 100644 index 000000000000..de0b6cdcc3c0 Binary files /dev/null and b/lib/matplotlib/mpl-data/images/zoom_to_rect_large.ppm differ diff --git a/tools/make_icons.py b/tools/make_icons.py new file mode 100755 index 000000000000..ea2febca4ab7 --- /dev/null +++ b/tools/make_icons.py @@ -0,0 +1,117 @@ +#!/usr/bin/env python +""" +Generates the toolbar icon images from the FontAwesome font. + +First download and extract FontAwesome from http://fontawesome.io/. +Place the FontAwesome.otf file in the tools directory (same directory +as this script). + +Generates SVG, PDF in one size (size they are vectors) and PNG, PPM and GIF in +24x24 and 48x48. +""" + +import matplotlib +matplotlib.use('agg') + +import six + +import os + +from PIL import Image + +import numpy as np + +from matplotlib import pyplot as plt +from matplotlib.font_manager import FontProperties +from matplotlib import cm +import matplotlib +import matplotlib.patheffects as PathEffects +matplotlib.rcdefaults() + +matplotlib.rcParams['svg.fonttype'] = 'path' +matplotlib.rcParams['pdf.fonttype'] = 3 +matplotlib.rcParams['pdf.compression'] = 9 + + +IMAGES_ROOT = os.path.join( + os.path.dirname(__file__), '..', 'lib', 'matplotlib', 'mpl-data', 'images') +FONT_PATH = os.path.join( + os.path.dirname(__file__), 'FontAwesome.otf') + + +def save_icon(fig, name): + fig.savefig(os.path.join(IMAGES_ROOT, name + '.svg')) + fig.savefig(os.path.join(IMAGES_ROOT, name + '.pdf')) + + for dpi, suffix in [(24, ''), (48, '_large')]: + fig.savefig(os.path.join(IMAGES_ROOT, name + suffix + '.png'), dpi=dpi) + + img = Image.open(os.path.join(IMAGES_ROOT, name + suffix + '.png')) + img.save(os.path.join(IMAGES_ROOT, name + suffix + '.ppm')) + + +def make_icon(fontfile, ccode): + prop = FontProperties(fname=fontfile, size=68) + + fig = plt.figure(figsize=(1, 1)) + fig.patch.set_alpha(0.0) + text = fig.text(0.5, 0.48, six.unichr(ccode), ha='center', va='center', + fontproperties=prop) + text.set_path_effects([PathEffects.Normal()]) + + return fig + + +def make_matplotlib_icon(): + fig = plt.figure(figsize=(1, 1)) + fig.patch.set_alpha(0.0) + ax = fig.add_axes([0.025, 0.025, 0.95, 0.95], projection='polar') + ax.set_axisbelow(True) + + N = 7 + arc = 2. * np.pi + theta = np.arange(0.0, arc, arc/N) + radii = 10 * np.array([0.2, 0.6, 0.8, 0.7, 0.4, 0.5, 0.8]) + width = np.pi / 4 * np.array([0.4, 0.4, 0.6, 0.8, 0.2, 0.5, 0.3]) + bars = ax.bar(theta, radii, width=width, bottom=0.0, linewidth=1, + edgecolor='k') + + for r, bar in zip(radii, bars): + bar.set_facecolor(cm.jet(r/10.)) + + for label in ax.get_xticklabels() + ax.get_yticklabels(): + label.set_visible(False) + + for line in ax.get_ygridlines() + ax.get_xgridlines(): + line.set_lw(0.0) + + ax.set_yticks(np.arange(1, 9, 2)) + ax.set_rmax(9) + + return fig + + +icon_defs = [ + ('home', 0xf015), + ('back', 0xf060), + ('forward', 0xf061), + ('zoom_to_rect', 0xf002), + ('move', 0xf047), + ('filesave', 0xf0c7), + ('subplots', 0xf1de), + ('qt4_editor_options', 0xf201)] + + +def make_icons(): + for name, ccode in icon_defs: + fig = make_icon(FONT_PATH, ccode) + save_icon(fig, name) + fig = make_matplotlib_icon() + save_icon(fig, 'matplotlib') + + +if __name__ == '__main__': + if not os.path.exists(FONT_PATH): + print("Download the FontAwesome.otf file and place it in the tools " + "directory") + make_icons()