AttributeError: 'Matplotlib.backends._backend_agg.rendereragg' Objekt hat kein Attribut 'Draw_gouraud_triangle' 'Python

Python-Programme
Anonymous
 AttributeError: 'Matplotlib.backends._backend_agg.rendereragg' Objekt hat kein Attribut 'Draw_gouraud_triangle' '

Post by Anonymous »

Ich habe versucht, den folgenden Code auszuführen, der einige Histogramme einiger Daten zeichnen soll. < /p>

Code: Select all

viz = cdf[['CYLINDERS','ENGINESIZE','FUELCONSUMPTION_COMB','CO2EMISSIONS']]
viz.hist()
plt.show()
< /code>
Dies ist die Fehlermeldung, die ich erhalte, wenn ich versuche, sie auszuführen: < /p>
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\IPython\core\formatters.py:339, in BaseFormatter.__call__(self, obj)
337     pass
338 else:
--> 339     return printer(obj)
340 # Finally look for special method names
341 method = get_real_method(obj, self.print_method)

File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\IPython\core\pylabtools.py:151, in print_figure(fig, fmt, bbox_inches, base64, **kwargs)
148     from matplotlib.backend_bases import FigureCanvasBase
149     FigureCanvasBase(fig)
--> 151 fig.canvas.print_figure(bytes_io, **kw)
152 data = bytes_io.getvalue()
153 if fmt == 'svg':

File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\matplotlib\backend_bases.py:2289, in FigureCanvasBase.print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, bbox_inches, pad_inches, bbox_extra_artists, backend, **kwargs)
2282     bbox_inches = rcParams['savefig.bbox']
2284 if (self.figure.get_constrained_layout() or
2285         bbox_inches == "tight"):
2286     # we need to trigger a draw before printing to make sure
2287     # CL works.  "tight" also needs a draw to get the right
2288     # locations:
-> 2289     renderer = _get_renderer(
2290         self.figure,
...
--> 110     self.draw_gouraud_triangle = self._renderer.draw_gouraud_triangle
111     self.draw_gouraud_triangles = self._renderer.draw_gouraud_triangles
112     self.draw_image = self._renderer.draw_image

AttributeError: 'matplotlib.backends._backend_agg.RendererAgg' object has no attribute 'draw_gouraud_triangle'
Kann jemand bitte erklären, was ich dagegen tun sollte?

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post