you call window.raise_ () from PyQT. Indeed, you can raise the window this way, but you need:
- set PyQT4 as a backend before doing any other operations with
matplotlib
AND
import matplotlib matplotlib.use('Qt4Agg')
- Either you correct the import statement (remove the brackets), or save the import and access the window through the shape
from
window = fig.canvas.manager.window
- Only then can you call
window.raise_() and the window will be in front of pycharm.
source share