变化超过0.99.x

  • 的默认行为 matplotlib.axes.Axes.set_xlim()matplotlib.axes.Axes.set_ylim()matplotlib.axes.Axes.axis() 以及相应的Pyplot函数已更改:当使用这些方法之一显式设置视图限制时,匹配轴的自动缩放功能将关闭。一个新的 auto Kwarg可以控制这种行为。限制Kwargs已重命名为 left正确的 而不是 xminxmax底部top 而不是 yminymax . 不过,旧名称仍可以使用。
  • 有五种新的轴方法,具有相应的Pyplot函数,以方便自动缩放、刻度位置和刻度标签格式,以及刻度和刻度标签的一般外观:
  • 这个 matplotlib.axes.Axes.bar() 方法接受 error_kw Kwarg;它是要传递给Errorbar函数的Kwarg字典。
  • 这个 matplotlib.axes.Axes.hist() 颜色 Kwarg现在接受一系列颜色规格来匹配一系列数据集。
  • 这个 EllipseCollection 已通过两种方式进行了更改:
    • 有一种新的 单位 选项“xy”,用数据单位缩放椭圆。这与:class:'~matplotlib.patches.Ellipse'缩放匹配。
    • 这个 高度宽度 Kwargs已被更改以指定高度和宽度,同样为了与 Ellipse ,以便更好地匹配它们的名称;以前它们指定了半高半宽。
  • 有一个新的rc参数 axes.color_cycle ,颜色循环现在独立于rc参数。 lines.color . matplotlib.Axes.set_default_color_cycle 被贬低。
  • 现在可以将多个数字打印到一个PDF文件中,并修改PDF文件的文档信息字典。查看类的DocStrings matplotlib.backends.backend_pdf.PdfPages 更多信息。
  • 远离的 configobjenthought.traits 包,这些包只是实验性训练配置所需的,并且有些过时。如果需要,可单独安装。
  • 新的RC参数 savefig.extension 设置由使用的文件扩展名 matplotlib.figure.Figure.savefig() 如果其 文件名 参数缺少扩展名。

  • 为了简化后端API,现在使用graphicsContext对象传递所有剪切矩形和路径,甚至在集合和图像上也是如此。因此:

    draw_path_collection(self, master_transform, cliprect, clippath,
                         clippath_trans, paths, all_transforms, offsets,
                         offsetTrans, facecolors, edgecolors, linewidths,
                         linestyles, antialiaseds, urls)
    
    # is now
    
    draw_path_collection(self, gc, master_transform, paths, all_transforms,
                         offsets, offsetTrans, facecolors, edgecolors,
                         linewidths, linestyles, antialiaseds, urls)
    
    
    draw_quad_mesh(self, master_transform, cliprect, clippath,
                   clippath_trans, meshWidth, meshHeight, coordinates,
                   offsets, offsetTrans, facecolors, antialiased,
                   showedges)
    
    # is now
    
    draw_quad_mesh(self, gc, master_transform, meshWidth, meshHeight,
                   coordinates, offsets, offsetTrans, facecolors,
                   antialiased, showedges)
    
    
    draw_image(self, x, y, im, bbox, clippath=None, clippath_trans=None)
    
    # is now
    
    draw_image(self, gc, x, y, im)
    
  • 有四种新的轴方法,具有处理非结构化三角形网格的相应Pyplot函数: