简体   繁体   English

matplotlib windows 10 旧的绘图窗口

[英]matplotlib windows 10 old looking plot window

I have python 2.7.14 on Win10, and installed matplotlib 2.1.2 via pip.我在 Win10 上安装了 python 2.7.14,并通过 pip 安装了 matplotlib 2.1.2。 I don't like the way the buttons and the whole plot window look like.我不喜欢按钮和整个绘图窗口的样子。 How can I fix this.我怎样才能解决这个问题。 It should rather look like in 1 .它应该看起来像1

supposed to be plot window应该是绘图窗口

my plot window我的绘图窗口

As of matplotlib version >= 2.0 using从 matplotlib 版本 >= 2.0 开始,使用

import matplotlib.pyplot as plt
plt.gca()
plt.show()

you get this window now:你现在得到这个窗口:

在此处输入图片说明

You can use the classic style ( plt.style.use("classic") ) to get the old figure style back:您可以使用经典样式( plt.style.use("classic") )来恢复旧的图形样式:

import matplotlib.pyplot as plt
plt.style.use("classic")
plt.gca()
plt.show()

在此处输入图片说明

The buttons however are now still different.然而,按钮现在仍然不同。

In order to change the buttons, you could locate the folder with the buttons,为了更改按钮,您可以找到带有按钮的文件夹,

<path to python>\Lib\site-packages\matplotlib\mpl-data\images

and replace the images in it with the images of your choice.并用您选择的图像替换其中的图像。 Eg you might want to download an older matplotlib version and take the images from there.例如,您可能想要下载较旧的 matplotlib 版本并从那里获取图像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM