import pandas as pd
import matplotlib.pyplot as plt
from pandas import Series,DataFrame
import numpy as np
from pylab import mpl
plt.rc('font',family='Times New Roman')
mpl.rcParams['font.size']=16
df = pd.read_excel('F://Research/2020/Xionjianli/Data/季节差异显著_genus1.xls',sheet_name='Sheet2')
ck=df['CKJWD-Sd(%)']/pow(15,1/2)
cq=df['CQKWD-Sd(%)']/pow(15,1/2)
plt.figure(figsize=(8,4),dpi=300)
plt.barh(df.index+0.4,df['Withering'],height=0.4,xerr=ck,error_kw = {
'ecolor' : '0.2', 'capsize' :2},label='Withering',color='r',edgecolor='black')
plt.barh(df.index,df['Grassy'],height=0.4,xerr=cq,error_kw = {
'ecolor' : '0.2', 'capsize' :2},label='Grassy',color='mediumblue',edgecolor='black')
plt.yticks(df.index+0.2,df['Species name'].values)
plt.tick_params(labelsize=16)
plt.legend(loc=5,framealpha=0,bbox_to_anchor=(1, 0.1),fontsize=16)
plt.savefig('F://Research/2020/Xionjianli/Data/季节差异_genus1(dpi=300).png',dpi=300,bbox_inches='tight')
plt.show()
import pandas as pd
import matplotlib.pyplot as plt
from pandas import Series,DataFrame
import numpy as np
from pylab import mpl
plt.rc('font',family='Times New Roman')
mpl.rcParams['font.size']=16
df = pd.read_excel('F://Research/2020/Xionjianli/Data/季节差异显著_phylum1.xls',sheet_name='Sheet1')
ck=df['Withering_Sd']/pow(15,1/2)
cq=df['Grassy_Sd']/pow(15,1/2)
plt.figure(figsize=(8,4),dpi=300)
plt.barh(df.index+0.4,df['Withering_Mean'],height=0.4,xerr=ck,error_kw = {
'ecolor' : '0.2', 'capsize' :2},label='Withering',color='r',edgecolor='black')
plt.barh(df.index,df['Grassy_Mean'],height=0.4,xerr=cq,error_kw = {
'ecolor' : '0.2', 'capsize' :2},label='Grassy',color='mediumblue',edgecolor='black')
plt.yticks(df.index+0.2,df['Species name'].values)
plt.tick_params(labelsize=16)
plt.legend(loc=5,framealpha=0,bbox_to_anchor=(1, 0.1),fontsize=16)
plt.axis('tight')
plt.savefig('F://Research/2020/Xionjianli/Data/季节差异Phylum1(dpi=300).png',dpi=300,bbox_inches='tight')
plt.show()
import pandas as pd
import matplotlib.pyplot as plt
from pandas import Series,DataFrame
import numpy as np
from pylab import mpl
plt.rc('font',family='Times New Roman')
mpl.rcParams['font.size']=16
df = pd.read_excel('F://Research/2020/Xionjianli/Data/区域差异显著_phylum1.xls',sheet_name='Sheet1')
ck=df['Withering_Sd']/pow(15,1/2)
cq=df['Grassy_Sd']/pow(15,1/2)
plt.figure(figsize=(8,4),dpi=300)
plt.barh(df.index+0.4,df['Withering_Mean'],height=0.4,xerr=ck,error_kw = {
'ecolor' : '0.2', 'capsize' :2},label='Withering',color='r',edgecolor='black')
plt.barh(df.index,df['Grassy_Mean'],height=0.4,xerr=cq,error_kw = {
'ecolor' : '0.2', 'capsize' :2},label='Grassy',color='mediumblue',edgecolor='black')
plt.yticks(df.index+0.2,df['Species name'].values)
plt.tick_params(labelsize=16)
plt.legend(loc=5,framealpha=0,bbox_to_anchor=(1, 0.1),fontsize=16)
plt.savefig('F://Research/2020/Xionjianli/Data/区域差异phylum1(dpi=300).png',dpi=300,bbox_inches='tight')
plt.show()
import pandas as pd
import matplotlib.pyplot as plt
from pandas import Series,DataFrame
import numpy as np
from pylab import mpl
plt.rc('font',family='Times New Roman')
mpl.rcParams['font.size']=16
df = pd.read_excel('F://Research/2020/Xionjianli/Data/区域差异显著_genus1.xls',sheet_name='Sheet1')
ck=df['Withering_Sd']/pow(15,1/2)
cq=df['Grassy_Sd']/pow(15,1/2)
plt.figure(figsize=(8,4),dpi=300)
plt.barh(df.index+0.4,df['Withering_Mean'],height=0.4,xerr=ck,error_kw = {
'ecolor' : '0.2', 'capsize' :2},label='Withering',color='r',edgecolor='black')
plt.barh(df.index,df['Grassy_Mean'],height=0.4,xerr=cq,error_kw = {
'ecolor' : '0.2', 'capsize' :2},label='Grassy',color='mediumblue',edgecolor='black')
plt.yticks(df.index+0.2,df['Species name'].values)
plt.tick_params(labelsize=16)
plt.legend(loc=5,framealpha=0,bbox_to_anchor=(1, 0.1),fontsize=16)
plt.savefig('F://Research/2020/Xionjianli/Data/区域差异genues(dpi=300).png',dpi=300,bbox_inches='tight')
plt.show()