Hi Aaron.
On Mon, Nov 11, 2024 at 8:38 PM Aaron Meurer wrote:
>
> I haven't followed all the changes to plotting. Do you know what the
> PR SymPy was that changed this?
That's not so straightforward ... different things seem to have broken
at different times. But maybe I wasn't using them correctly in the
first place?
The example which assigns to "parent"
(
https://nbviewer.org/github/mgeier/python-audio/blob/master/sympy/sympy-matplotlib-animations.ipynb#Changing-the-Whole-Plot)
still partially works with
https://github.com/sympy/sympy/commit/5d1e056.
I'm saying "partially", because it now cycles the plotting colors,
which it didn't do before (see below for the cause of that problem).
One commit later (
https://github.com/sympy/sympy/commit/46558492a7),
I'm getting this exception:
AttributeError: 'MatplotlibBackend' object has no attribute 'fig'
The "fig" attribute is now not set in the constructor anymore, but
instead at a later point, e.g. when calling process_series(). So
should I call that first?
If yes, it is still not working. Even though this avoids the
exception, now the animation simply consists of an empty plot (i.e.
only the axes are visible).
BTW, I'm using "show=False". When I drop that, the "has no attribute
'fig'" goes away, but the animation still doesn't work (instead, there
are a few stray plots generated).
Going back in the history, I found that
https://github.com/sympy/sympy/commit/79a2cd5432177f662b2bebe1ffc3b3bc4ca575b9
is the commit that introduces the color cycling.
According to the commit message, the color change is definitely
intentional, so I guess I'll have to try to work around that behavior
change.
The first example still doesn't work at this point in the history. It
just shows an empty plot (only the axes are visible).
I wanted to go further back in history, but I wasn't able to install a
combination of SymPy/NumPy/Matplotlib/Python that worked.
Is there anything else I should try?
cheers,
Matthias
> To view this discussion visit
https://groups.google.com/d/msgid/sympy/CAKgW%3D6K1hVkWmw3FZ0nHBemS4oBkAqC4kRHdR9uxSXXk6f21EA%40mail.gmail.com.