plt.style.use(style)
作用:
使用matplotlib自帶的幾種美化樣式,就可以很輕松的對生成的圖形進行美化。
可以使用matplotlib.pyplot.style.available擷取所有的美化樣式
print(plt.style.available)
['Solarize_Light2', '_classic_test_patch', 'bmh', 'classic',
'dark_background', 'fast', 'fivethirtyeight', 'ggplot', 'grayscale',
'seaborn', 'seaborn-bright', 'seaborn-colorblind', 'seaborn-dark',
'seaborn-dark-palette', 'seaborn-darkgrid', 'seaborn-deep', 'seaborn-muted',
'seaborn-notebook', 'seaborn-paper', 'seaborn-pastel', 'seaborn-poster',
'seaborn-talk', 'seaborn-ticks', 'seaborn-white', 'seaborn-whitegrid',
'tableau-colorblind10']
plt.style.use('ggplot')
如果對您有幫助,麻煩點贊關注,這真的對我很重要!!!如果需要互關,請評論留言!