1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Matplotlib canvas has no buffer_rgba attribute

Discussão em 'Python' iniciado por Stack, Setembro 14, 2024.

  1. Stack

    Stack Membro Participativo

    I use the manim-matplotlib technique for animating my plots. On the PC that I am running this on I use a virtual environment. From one day to the other this stopped working and I am wondering why. Matplotlib 3.7.5, Python 3.8

    def figtoimg(fig):
    fig.canvas.draw()
    img = fig.canvas.buffer_rgba()
    plt.close(fig)
    return img


    Using the function above throws the following error:

    AttributeError: 'FigureCanvasPgf' object has no attribute 'buffer_rgba'

    Continue reading...

Compartilhe esta Página