Следующий код работает нормально:
Python 3.8.2 (default, Apr 8 2020, 14:31:25)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib.pyplot as plt
>>> fig = plt.figure()
>>> fig.suptitle("Empty figure")
Text(0.5, 0.98, 'Empty figure')
>>> fig.show()
Но если я установлю субтитры (или сделаю что-то другое) после show
, он не будет работать, даже если я снова запущу show()
.
Python 3.8.2 (default, Apr 8 2020, 14:31:25)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib.pyplot as plt
>>> fig = plt.figure()
>>> fig.show()
>>> fig.suptitle("Empty figure")
Text(0.5, 0.98, 'Empty figure')
>>> fig.show()
Я новичок в python. Может ли кто-нибудь помочь мне?