The hardcoded setting of TkAgg right on top of pypulseq.Sequence.sequence with mpl.use('TkAgg') can lead to problems with another backend like QT5. It raises:
ImportError: Cannot load backend 'TkAgg' which requires the 'tk' interactive framework, as 'qt5' is currently running
In many cases, this can be helped by manually changing the framework to 'tk', if you read up on it. However, we like to read sequence files in a QT5 framework (a Qt5 based application). You can reproduce it by setting the matplotlib framewrk to 'qt5' or other than 'tk'.
Is the TkAgg backend absolutely necessary? If so, would it be possible to separate the backend switch (and maybe the plot function) from the rest of the sequence code?
It would be best if the plot is not dependent on the backend, but it would suffice for us it the functions that do not depend on matplotlib can be imported without the backend switch.
The hardcoded setting of TkAgg right on top of pypulseq.Sequence.sequence with mpl.use('TkAgg') can lead to problems with another backend like QT5. It raises:
ImportError: Cannot load backend 'TkAgg' which requires the 'tk' interactive framework, as 'qt5' is currently running
In many cases, this can be helped by manually changing the framework to 'tk', if you read up on it. However, we like to read sequence files in a QT5 framework (a Qt5 based application). You can reproduce it by setting the matplotlib framewrk to 'qt5' or other than 'tk'.
Is the TkAgg backend absolutely necessary? If so, would it be possible to separate the backend switch (and maybe the plot function) from the rest of the sequence code?
It would be best if the plot is not dependent on the backend, but it would suffice for us it the functions that do not depend on matplotlib can be imported without the backend switch.
Thanks for your help!