如何调整matplotlib中的图表



如何解决此问题?
Trackback(最近的最新通话):

  File "C:UsersVrushab PCAnaconda3libsite-packagesIPythoncoreformatters.py", line 307, in __call__
    return printer(obj)
  File "C:UsersVrushab PCAnaconda3libsite-packagesIPythoncorepylabtools.py", line 240, in <lambda>
    png_formatter.for_type(Figure, lambda fig: print_figure(fig, 'png', **kwargs))
  File "C:UsersVrushab PCAnaconda3libsite-packagesIPythoncorepylabtools.py", line 124, in print_figure
    fig.canvas.print_figure(bytes_io, **kw)
  File "C:UsersVrushab PCAnaconda3libsite-packagesmatplotlibbackend_bases.py", line 2252, in print_figure
    **kwargs)
  File "C:UsersVrushab PCAnaconda3libsite-packagesmatplotlibbackendsbackend_agg.py", line 545, in print_png
    FigureCanvasAgg.draw(self)
  File "C:UsersVrushab PCAnaconda3libsite-packagesmatplotlibbackendsbackend_agg.py", line 459, in draw
    self.renderer = self.get_renderer(cleared=True)
  File "C:UsersVrushab PCAnaconda3libsite-packagesmatplotlibbackendsbackend_agg.py", line 476, in get_renderer
    self.renderer = RendererAgg(w, h, self.figure.dpi)
  File "C:UsersVrushab PCAnaconda3libsite-packagesmatplotlibbackendsbackend_agg.py", line 93, in __init__
    self._renderer = _RendererAgg(int(width), int(height), dpi, debug=False)
ValueError: Image size of 8804752x396 pixels is too large. It must be less than 2^16 in each direction.

我认为错误代码非常清楚:您要绘制的图像是大的。您必须减小图像的大小,即必须将其缩小。您甚至想绘制具有8804752x396大小的绘制?您确定您以前没有做错事吗?这似乎很大。

编辑:如果您只想将图像保存为png或类似的东西,则尝试将后端更改为其他东西 - 在这里寻找更好的后端来适合您的任务!

相关内容

  • 没有找到相关文章

最新更新