I have set up an external monitor that is connected to my laptop, so when I'm working I primarily use the external monitor for writing code. Now, when I generate a plot using matplotlib it always appears on my laptop and not on the external monitor from which I am working on and where I use VS code and the terminal.
After some research I have found this post where a work around was suggested using plt.switch_backend('QT4Agg')
which works fine, however I receive the depreciation warning that matplotlib.backends.backend_qt4agg
backend was deprecated in Matplotlib 3.3 and will be removed two minor releases later. (I am using Matplotlib version 3.4.2 and Python 3.9.2 on a MacBook Pro with macOS Big Sur version 11.1)
Is there a way I can "tell" matplotlib to show the plot on my external monitor instead of my main monitor in a simple way? For example something like: plt.show(on_external_screen=True)
? Or is there another work around for newer versions of matplotlib?