1

I would like to have the window manager to, well, manage the plots. When I create a plot interactively in python:

from numpy import arange
import matplotlib
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as pt
pt.ion()

x = arange(-10,10,step=.1)
pt.plot(x, x**3)

And check for the window properties, I get nothing.

% xprop | grep CLASS
WM_CLASS(STRING) = " ", " "

How can I tell matplotlib/Python to add X-window properties to its plots?

0

1 Answer 1

0

As it appears, this is not a problem of matplotlib nor is matplotlib the solution: Instead the backends seem to be responsible for creating the window clients and do the registration and settings of X.org-properties.

Having switched from Qt5Agg to TkAgg, I suddenly have all the properties I could wish for:

% xprop | grep CLASS
WM_CLASS(STRING) = "tk", "Tk"
% xprop | grep WM_NAME
_NET_WM_NAME(UTF8_STRING) = "Figure 1"
WM_NAME(STRING) = "Figure 1"

My window manager (herbstluftwm) is now handling all newly created figures nicely.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.