作为标题,当使用“fivethirtyeight”等样式时,如何将网格线移到后面?在
我试过了
Axis.set_axisbelow(True)和{}
,但都不管用。在
正如你所见,网格线位于图例的顶部,这使得它很难阅读。在
代码如下所示:import pandas as pd
import matplotlib.pyplot as plt
plt.style.use('fivethirtyeight')
data = pd.DataFrame(np.array([['Bacterial alpha-amylase', 1.0, 4.0, 0.0, 4.0] ,
['Fungal glucoamylase', 7.5, 24.0, 0.0, 24.0] ,
['Fungal phytase', 2.2, 6.0, 0.0, 6.0] ,
['Bacterial protease', 4.3, 14.0, 0.0, 14.0] ,
['Bacterial amylase', 10.2, 29.0, 0.0, 29.0] ,
['GSK_A', 12.0, 65.0, 0.0, 65.0] ,
['GSK_B', 3.0, 25.0, 0.0, 25.0] ,
['GSK_C', 4.0, 35.0, 0.0, 35.0] ,
['Ecoinvent_Europe', 6.4237, 0.052362, 0.0, 0.052362] ,
['Ecoinvent_rest of world', 8.8557, 0.056691