Repository: spyder-ide/spyder

Issue:
Some issues with the Plots plugin
While working on PR #8192, I discovered a couple of problems with the Plots plugin:

1. Miniatures are not shown on Python 2. I went back to the PR where the plugin was introduced and verified that the problem was present from the beginning.

2. The Save and Remove buttons on the miniatures scrollbar are not shown correctly in the dark theme:

    ![seleccion_003](https://user-images.githubusercontent.com/365293/49105698-578d0d00-f24f-11e8-956a-06503c306eda.png)

    @jnsebgosselin, I think you crafted things very well for Fusion but did not considered other themes ;-)

3. By default plots are shown in the IPython console *and* the Plots plugin. I think we should change that and instead:

    1. Print a message in the console the first time, saying that plots are now rendered in the Plots plugin.
    2. This message should also mention how to get the previous behavior.

@jnsebgosselin, could you help us with this one? Thanks!


Discussion:
> @jnsebgosselin, could you help us with this one? Thanks!

Sure, I'll take a look at it very soon. Thank you very much for taking the time to log these issues.
Sure, no problem :+1: 
@jnsebgosselin, since these issues are very simple, I'm going to ask @dalthviz to solve them. Hope that's ok for you.
Sure let's go! I'm very busy right now, so that is very welcomed.

Resolving patch:
diff --git a/spyder/config/main.py b/spyder/config/main.py
--- a/spyder/config/main.py
+++ b/spyder/config/main.py
@@ -177,7 +177,7 @@
              }),
             ('plots',
              {
-              'mute_inline_plotting': False,
+              'mute_inline_plotting': True,
               'show_plot_outline': False,
              }),
             ('editor',
@@ -751,7 +751,7 @@
 #    or if you want to *rename* options, then you need to do a MAJOR update in
 #    version, e.g. from 3.0.0 to 4.0.0
 # 3. You don't need to touch this value if you're just adding a new option
-CONF_VERSION = '47.2.0'
+CONF_VERSION = '47.3.0'
 
 
 # Main configuration instance
diff --git a/spyder/plugins/ipythonconsole/widgets/figurebrowser.py b/spyder/plugins/ipythonconsole/widgets/figurebrowser.py
--- a/spyder/plugins/ipythonconsole/widgets/figurebrowser.py
+++ b/spyder/plugins/ipythonconsole/widgets/figurebrowser.py
@@ -15,6 +15,9 @@
 # ---- Third party library imports
 from qtconsole.rich_jupyter_widget import RichJupyterWidget
 
+# ---- Local library imports
+from spyder.config.base import _
+
 
 class FigureBrowserWidget(RichJupyterWidget):
     """
@@ -31,6 +34,7 @@ class FigureBrowserWidget(RichJupyterWidget):
     def set_figurebrowser(self, figurebrowser):
         """Set the namespace for the figurebrowser widget."""
         self.figurebrowser = figurebrowser
+        self.sended_render_message = False
 
     # ---- Private API (overrode by us)
     def _handle_display_data(self, msg):
@@ -55,6 +59,15 @@ def _handle_display_data(self, msg):
             self.sig_new_inline_figure.emit(img, fmt)
             if (self.figurebrowser is not None and
                     self.figurebrowser.mute_inline_plotting):
+                if not self.sended_render_message:
+                    msg['content']['data']['text/plain'] = _(
+                        'Figures now render in the Plots pane by default. '
+                        'To make them also appear inline in the Console, '
+                        'uncheck "Mute Inline Plotting" under the Plots '
+                        'pane options menu.')
+                    self.sended_render_message = True
+                else:
+                    msg['content']['data']['text/plain'] = ''
                 del msg['content']['data'][fmt]
 
         return super(FigureBrowserWidget, self)._handle_display_data(msg)
diff --git a/spyder/plugins/plots/widgets/figurebrowser.py b/spyder/plugins/plots/widgets/figurebrowser.py
--- a/spyder/plugins/plots/widgets/figurebrowser.py
+++ b/spyder/plugins/plots/widgets/figurebrowser.py
@@ -11,6 +11,7 @@
 """
 
 # ---- Standard library imports
+from __future__ import division
 import os.path as osp
 
 # ---- Third library imports
@@ -456,7 +457,7 @@ def setup_gui(self):
         scrollarea = self.setup_scrollarea()
         up_btn, down_btn = self.setup_arrow_buttons()
 
-        self.setFixedWidth(135)
+        self.setFixedWidth(150)
         layout = QVBoxLayout(self)
         layout.setContentsMargins(0, 0, 0, 0)
         layout.setSpacing(0)


Test patch:
diff --git a/spyder/app/tests/test_mainwindow.py b/spyder/app/tests/test_mainwindow.py
--- a/spyder/app/tests/test_mainwindow.py
+++ b/spyder/app/tests/test_mainwindow.py
@@ -150,6 +150,9 @@ def main_window(request):
     # Tests assume inline backend
     CONF.set('ipython_console', 'pylab/backend', 0)
 
+    # Test assume the plots are rendered in the console
+    CONF.set('plots', 'mute_inline_plotting', False)
+
     # Check if we need to use introspection in a given test
     # (it's faster and less memory consuming not to use it!)
     use_introspection = request.node.get_marker('use_introspection')