matplotlib作为Python中的可视化模块,因为操作简单而被广泛运用。
%matplotlib inline #此行用于避免后期加入plt.show()
import matplotlib as mpl
import matplotlib.pyplot as plt
1.plt有很多风格
#查看绘图风格
plt.style.available
#随便选择一种风格
plt.style.use('ggplot')
可以选择的风格如下: ['bmh', 'classic', 'dark_background', 'fast', 'fivethirtyeight', 'ggplot', 'grayscale', 'seaborn-bright', 'seaborn-colorblind', 'seaborn-dark-palette', 'seaborn-dark', 'seaborn-darkgrid', 'seaborn-deep', 'seaborn-muted', 'seaborn-notebook', 'seaborn-paper', 'seaborn-pastel', 'seaborn-poster', 'seaborn-talk', 'seaborn-ticks', 'seaborn-white', 'seaborn-whitegrid', 'seaborn', 'Solarize_Light2', 'tab