Hello,

I was using the "configure subplots" dialog a lot recently to precisely resize my plots, and I noticed that often when I changed a slider only slightly (say by 1 pixel), the numeric value displayed next to the slider wouldn't change, because its precision was too low. So, I modified the code to display 3 decimal places instead of just 2. Now, every change to the slider always causes a visible change in the displayed subplot param value. This makes it easy to precisely set your subplot params to be the same as other plots, using the gui.

I've attached the short patch.

I've only tested this in wxagg under win32. It's possible that on another platform there might be less space to display the extra digit, and it might get cut off, but I think that's unlikely.

Cheers,

Martin
Index: lib/matplotlib/widgets.py
===================================================================
--- lib/matplotlib/widgets.py   (revision 4202)
+++ lib/matplotlib/widgets.py   (working copy)
@@ -169,7 +169,7 @@

     Call on_changed to connect to the slider event
     """
-    def __init__(self, ax, label, valmin, valmax, valinit=0.5, valfmt='%1.2f',
+    def __init__(self, ax, label, valmin, valmax, valinit=0.5, valfmt='%1.3f',
                  closedmin=True, closedmax=True, slidermin=None, 
slidermax=None,
                  dragging=True):
         """
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to