文献图
来源
Guo, W., et al., Vegetation can strongly regulate permafrost degradation at its southern edge through changing surface freeze-thaw processes. Agricultural and Forest Meteorology, 2018. 252: p. 10-17.
解释
颜色和形状表示类别,灰色线表示标准差,适合用来展示不同类型对象的分布。
复现图
复现代码(python)
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
rng = np.random.RandomState(1234)
x1 = rng.rand(8)
x2 = rng.rand(8)
x3 = rng.rand(8)
x4 = rng.rand(8)
y1 = rng.rand(8)
y2 = rng.rand(8)
y3 = rng.rand(8)
y4 = rng.rand(8)
plt.figure(figsize=(8,8))
#------数据展示------
marker = 'o' # 'o','.',',','x','+','v','^','<','>','s','d'
plt.plot(x1,y1,marker,c='teal',ms=10) #Pine
plt.errorbar(x1,y1,xerr=np.std(x1,ddof=1),yerr=np.std(y1,ddof=1),
fmt='.',c='gray',alpha=0.5,lw=1)
plt.plot(x2,y2,marker,c='blue',ms=10) #Larch
plt.errorbar(x2,y2,xerr=np.std(x2,ddof=1),yerr=np.std(y2,ddof=1),
fmt='.',c='gray',alpha=0.5,lw=1)
marker = 's'
plt.plot(x3,y3,marker,c='red',ms=10) #Steppe for pine
plt.errorbar(x3,y3,xerr=np.std(x3,ddof=1),yerr=np.std(y3,ddof=1),
fmt='.',c='gray',alpha=0.5,lw=1)
plt.plot(x4,y4,marker,c='orange',ms=10) #Steppe for larch
plt.errorbar(x4,y4,xerr=np.std(x4,ddof=1),yerr=np.std(y4,ddof=1),
fmt='.',c='gray',alpha=0.5,lw=1)
#------数据展示------
#------图例制作------
x0 = 0
y0 = 0
marker = 's' #Thawing
plt.plot(x0,y0,marker,label="Pine",c='teal',ms=10)
plt.plot(x0,y0,marker,label="Larch",c='blue',ms=10)
#Freezing
plt.plot(x0,y0,marker,label="Steppe for pine",c='red',ms=10)
plt.plot(x0,y0,marker,label="Steppe for larch",c='orange',ms=10)
plt.plot(x0,y0,marker,label=" ",c='white',ms=10) # 空行
plt.plot(x0,y0,marker,label="Thawing",c='black',ms=10)
marker = 'o'
plt.plot(x0,y0,marker,label="Freezing",c='black',ms=10)
plt.plot(x0,y0,'s',label=" ",c='white',ms=10) # 掩盖图例
#------图例制作------
plt.legend(bbox_to_anchor=(1.52, 1.02),loc=0,fontsize=20,
frameon=False,labelspacing=0.2,handletextpad=0.2 )
plt.ylabel("y",fontsize=20)
plt.xlabel("x",fontsize=20)
plt.tick_params(labelsize=20)
plt.show()