3.0.1 版本的 API 变更#

matplotlib.tight_layout.auto_adjust_subplotpars 现在如果新的子图参数将导致轴的宽度或高度为零,则可以返回 None。这会阻止 tight_layout 的执行。同样,matplotlib.tight_layout.get_tight_layout_figure 也将返回 None。

为了提高导入(启动)时间,私有模块现在被延迟导入。这些模块在这些位置不再可用:

  • matplotlib.backends.backend_agg._png

  • matplotlib.contour._contour

  • matplotlib.image._png

  • matplotlib.mathtext._png

  • matplotlib.testing.compare._png

  • matplotlib.texmanager._png

  • matplotlib.tri.triangulation._tri

  • matplotlib.tri.triangulation._qhull

  • matplotlib.tri.tricontour._tri

  • matplotlib.tri.trifinder._tri