matplotlib Python的安装问题

这个问题在这里已经有了答案:

  • macosx下的python matplotlib框架? 8个答案

  • 问题原因在mac os图像渲染matplotlib的后端(默认情况下使用Cocoa的API呈现什么是后端)。 有Qt4Agg和GTKAgg,作为后端不是默认设置。 设置不同于其他窗口或linux操作系统的macosx的后端。

    我按照以下方式解决此问题:

  • 我假设你已经安装了pip matplotlib,在你的根目录中有一个名为~/.matplotlib
  • 在那里创建一个~/.matplotlib/matplotlibrc文件并添加如下代码: backend: TkAgg
  • 从这个链接你可以尝试不同的图表。

    链接地址: http://www.djcxy.com/p/46717.html

    上一篇: Installation Issue with matplotlib Python

    下一篇: Python matplotlib importError in command prompt but not in python shell