Why doesn't the save button work on a matplotlib plot?

前端 未结 4 934
野性不改
野性不改 2020-12-09 05:18

I have matplotlib 1.0.0 installed in a Python 2.7 virtualenv on Mac OS X 10.6. I can create plots fine. However, whenever I press the Save button, I can\'t type tex

4条回答
  •  無奈伤痛
    2020-12-09 06:02

    For those that Thouis method didn't work:

    I noticed that a simple work around is to change matplotlib backend. Here is a list of available backends:

    http://matplotlib.org/faq/usage_faq.html#what-is-a-backend

    Note that you should choose one of the renderer ones (i.e. the ones that support show() command). You might need to install the backend, but you might have multiple ones installed.

    To do so:

    import matplotlib
    matplotlib.use('Qt4Agg')    #replace 'Qt4Agg' with desired backend
    

    Warning: This should be done BEFORE importing pylab, etc.

提交回复
热议问题