Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@beenje
Copy link
Contributor

@beenje beenje commented Nov 24, 2022

Forcing the backend to TkAgg prevents to run lucid3 without a X server (like in a docker container). A display is only needed when using --display.
Let matplotlib detect the proper backend to use.

From https://matplotlib.org/stable/users/explain/backends.html:

Without a backend explicitly set, Matplotlib automatically detects a usable backend based on what is available on your system and on whether a GUI event loop is already running. The first usable backend in the following list is selected: MacOSX, QtAgg, GTK4Agg, Gtk3Agg, TkAgg, WxAgg, Agg. The last, Agg, is a non-interactive backend that can only write to files. It is used on Linux, if Matplotlib cannot connect to either an X display or a Wayland display.

Using use will require changes in your code if users want to use a different backend. Therefore, you should avoid explicitly calling use unless absolutely necessary.

beenje and others added 2 commits November 24, 2022 11:54
Forcing the backend to TkAgg prevents to run lucid3 without a X server (like in a docker container).
A display is only needed when using --display.
Let matplotlib detect the proper backend to use.
@olofsvensson olofsvensson merged commit 586ae26 into mxcube:master Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants