Skip to content

[bdsim BUG] - Fails to refresh animation as backend is set to QtAgg (not Qt5Agg) #27

@alsaibie

Description

@alsaibie

System

  • Windows 11
  • Python 3.10
  • bdsim 1.1.2
  • matplotlib 3.9.2
  • PyQt5 5.15.2

Running models with >> python models\model-name.py fails to refresh the animations

This is due to the default backend set to QtAgg (not Qt5Agg). (seems the '5' is dropped in matplotlib 3.9.2)

This is resolved by explicitly setting the backend atop the model-name.py file

import matplotlib
matplotlib.use('Qt5Agg') # or matplotlib.use('TkAgg')
...

Suggestion:

Add QtAgg in the backend checks in graphics.py?

            elif self._simstate.backend.lower() in ["qt5agg", "qtagg"]:

Or automatically revert to mpl.use('Qt5Agg') if using QtAgg

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions