Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy doesn't the save button work on a matplotlib plot?
    primarykey
    data
    text
    <p>I have <a href="http://matplotlib.sourceforge.net/" rel="nofollow noreferrer">matplotlib 1.0.0</a> installed in a Python 2.7 virtualenv on Mac OS X 10.6. I can create plots fine. However, whenever I press the <em>Save</em> button, I can't type text into the save dialog window nor can I save the plot. The only thing I can do is hit cancel. Any thoughts on what's causing this and how to fix it?</p> <p><img src="https://i.stack.imgur.com/oCwsw.jpg" alt="alt text"></p> <h2>Matplotlib installation procedure</h2> <p>I installed matplotlib by cloning <a href="http://github.com/astraw/matplotlib" rel="nofollow noreferrer">astraw's matplotlib github repository</a> and then loosely following <a href="http://blog.hyperjeff.net/?p=160" rel="nofollow noreferrer">HyperJeff's Installation Instructions for numpy/scipy/matplotlib</a>. Below are the potentially relevant sections of <code>setup.cfg</code> and <code>make.osx</code>, including the sections that I modified prior to compiling and installing.</p> <h3>setup.cfg</h3> <pre><code>[egg_info] tag_svn_revision = 1 [directories] basedirlist = /Users/matthew/.virtualenvs/matplotlib-test [status] #suppress = True #verbose = True [provide_packages] [gui_support] #gtk = False #gtkagg = False #tkagg = False wxagg = False #macosx = False [rc_options] backend = MacOSX #numerix = numpy </code></pre> <h3>make.osx</h3> <pre><code># build mpl into a local install dir with PREFIX=/Users/matthew/.virtualenvs/matplotlib-test MPLVERSION=1.0rc1 PYVERSION=2.7 PYTHON=python${PYVERSION} ZLIBVERSION=1.2.3 PNGVERSION=1.2.39 FREETYPEVERSION=2.3.11 MACOSX_DEPLOYMENT_TARGET=10.6 OSX_SDK_VER=10.6 ARCH_FLAGS="-arch i386-arch x86_64" ## You shouldn't need to configure past this point (but I did...) PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig" CFLAGS="${ARCH_FLAGS} -I${PREFIX}/include -I${PREFIX}/include/freetype2 -isysroot /Developer/SDKs/MacOSX${OSX_SDK_VER}.sdk" LDFLAGS="${ARCH_FLAGS} -L${PREFIX}/lib -syslibroot,/Developer/SDKs/MacOSX${OSX_SDK_VER}.sdk" PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig" CFLAGS="-arch i386 -arch x86_64 -I${PREFIX}/include -I${PREFIX}/include/freetype2 -isysroot /Developer/SDKs/MacOSX${OSX_SDK_VER}.sdk" LDFLAGS="-arch i386 -arch x86_64 -L${PREFIX}/lib -syslibroot,/Developer/SDKs/MacOSX${OSX_SDK_VER}.sdk" FFLAGS="-arch i386 -arch x86_64" </code></pre> <p>After modifying <code>setup.cfg</code> and <code>make.osx</code>, I issued the following commands to install matplotlib:</p> <pre><code>make -f make.osx fetch deps mpl_build mpl_install python setup.py install </code></pre> <p><em>Note:</em> <code>sudo</code> isn't required, since I'm installing into a virtualenv instead of into the site-packages like HyperJeff is doing.</p> <h2>Python Installation</h2> <p>I installed Python 2.7 using python.org's <em>Python 2.7 PPC/i386/x86-64 Mac OS X Installer Disk Image for Mac OS X 10.5</em>. Thanks to <a href="https://stackoverflow.com/questions/3472349/what-are-the-differences-between-the-two-python-2-7-mac-os-x-disk-image-installer/3472625#3472625">Ned Deily's answer to this SO question</a>, I know that this version of Python 2.7 cannot run IDLE or Tkinter on Mac OS X 10.6.</p> <h2>Questions</h2> <ol> <li>Could the version of Python 2.7 that I have installed be the cause of the problem? Should I reinstall Python 2.7 using the <em>Python 2.7 32-bit Mac OS X Installer Disk Image for Mac OS X 10.3 through 10.6</em>?</li> <li>Is there a different <code>gui_support</code> option that I need to configure in <code>setup.cfg</code> and then recompile matplotlib?</li> </ol> <h2>Update, September 13, 2010, 3:33 PM</h2> <p>It appears that other Mac OS X and matplotlib users are having the same problem. In the matplotlib-users mailing list, <a href="http://sourceforge.net/mailarchive/message.php?msg_name=3E234DB6-BD55-4F95-803E-EF0806E80371%40gmail.com" rel="nofollow noreferrer">two users reported having the same problem on Mac OS X 10.5</a>. Although, they were running matplotlib 0.99.1.1 and 0.99.1.2 versus matplotlib 1.0.0 that I have installed.</p> <h2>Updated, September 14, 2010, 8:18 AM</h2> <p><a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=2973874&amp;group_id=80706&amp;atid=560720" rel="nofollow noreferrer">matplotlib bug 2973874</a> was opened on 20-Mar-10 with the same issue. However, it's a priority 5 and hasn't been modified since the bug was originally opened. Below is the description from the bug:</p> <blockquote> <p>I am running the 6.0.1 enthought python distibution 64bit Mac. If a run a plot and click save I get a save dialog window that opens, I canot enter text in the file name field. I can select an existing file but still cannot modify the name. If I select a non png file it does not overwrite it. I get a file with the same name but with the png extension.</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload