Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jupyter Viz: Don't avoid interactive backend #2165

Merged
merged 2 commits into from
Jul 4, 2024

Conversation

EwoutH
Copy link
Member

@EwoutH EwoutH commented Jul 3, 2024

We were avoiding the interactive backend, but that isn't recommended anymore and Solara should take care of that itself.

Removing this resolves this bug:

For some reason, regular matplotlib and seaborn plots don't show anymore after a Solara page has been initiated. In the code below you can see the first seaborn plot showing well, but the second not showing.

In PyCharm, the first plot is also shown fine, but instead of just not showing the second plot anymore, but gives an error:

ipykernel_29332\2165788151.py:2: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown
  plt.show()

For details, see widgetti/solara#703, which this PR resolves.

We were avoiding the interactive backend, but that isn't recommended anymore and Solara should take care of that itself.
@EwoutH EwoutH added the bug Release notes label label Jul 3, 2024
@EwoutH EwoutH requested review from rht and Corvince July 3, 2024 16:20
Copy link

github-actions bot commented Jul 3, 2024

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
Schelling small 🔵 -0.3% [-0.6%, +0.0%] 🔵 +0.3% [+0.2%, +0.5%]
Schelling large 🔵 -0.5% [-0.9%, -0.1%] 🔵 +1.2% [-0.9%, +3.2%]
WolfSheep small 🔵 +0.5% [-0.4%, +1.3%] 🔵 +1.5% [+1.2%, +1.8%]
WolfSheep large 🔵 +0.2% [-0.3%, +0.7%] 🔵 +1.2% [+0.1%, +2.4%]
BoidFlockers small 🔵 -0.9% [-1.6%, -0.2%] 🔵 -3.1% [-3.9%, -2.3%]
BoidFlockers large 🔵 -1.3% [-1.6%, -0.9%] 🔵 -2.0% [-2.8%, -1.3%]

@rht rht merged commit e8d8b4e into projectmesa:main Jul 4, 2024
10 of 11 checks passed
vitorfrois pushed a commit to vitorfrois/mesa that referenced this pull request Jul 15, 2024
* Jupyter Viz: Don't avoid interactive backend

We were avoiding the interactive backend, but that isn't recommended anymore and Solara should take care of that itself.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Release notes label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants