How can I show figures independent of screen resolution in python tkinter with matplotlib?

Viewed 297

When I run this code of python to plot on a Ultra HD screen, the icons and texts on figure seem too small (if you can see at all).

import matplotlib.pyplot as plt
import numpy as np
import scipy.signal
t = np.linspace(0, 1, 500, endpoint=False)
plt.plot(t, scipy.signal.square(2 * np.pi * 5 * t))
plt.ylim(-2, 2)
plt.show()

Here is how it is seen: enter image description here

I would like my app independent of screen resolution, ie, the icons, texts, etc. are shown as some acceptable size (equal percentage of screen on all resolutions, for example).

How could I do that? Thank you.

1 Answers
Related