Matplotlib 2.1.2 the number windows will not close (manually or using a keyboard shortcut) after upgrading to os x High Sierra

I am analyzing flow cytometry data with python 2.7.12 with the FlowCytometryTools0.4.5 module. After upgrading to High Sierra (macOS), graphic windows will no longer close after the show () function is called. The numbers are created using pylab 1.13.3, which was installed with matplotlib 2.1.2 along with FlowCytometryTools 0.4.5 - all modules were installed using the install install command in the terminal (for example: python2.7 pip install matplotlib). Python still runs in the background after you try to close the window, and the scripts will continue to work as if the figure was closed, but the window remains on the screen, which makes it difficult to work in the future, since the window cannot be minimized or deleted without coercion Launcher (spaceship icon).

As mentioned earlier, FlowCytometryTools uses pylab, so I was wondering if plotting through pyplot would give a different result, but alas, that wasn't there. Even the base pyplot.plot (s) file had the same problem, regardless of the FlowCytometry module. This problem did not exist when running the same script (s) and versions of Python, matplotlib, FlowCytometryTools when running on OS X Sierra. Interestingly, this problem does not occur when plotting using pyplot using python 3.6 and matplotlib 2.1.2, but unfortunately FlowCytometryTools only works on Python 2. Both pylab and matplotib use the MacOSX backend - for rent, that appears, when I enter the pylab.rcParams ['backend'] command.

A simple set of code that creates a window with a closing shape is below:

import matplotlib.pyplot as plt
x = range(10)
y = range(10)
plt.plot(x,y)
plt.show()

show() , , Launcher. , Python 2.7.12, matplotlib 2.1.2 pylab 1.13.3. OS X Sierra , Python 3.6 matplotlib 2.1.2.

- , , .

+4

Source: https://habr.com/ru/post/1693049/


All Articles