| 
 
	积分118贡献 精华在线时间 小时注册时间2021-11-1最后登录1970-1-1 
 | 
 
| 
x
登录后查看更多精彩内容~您需要 登录 才可以下载或查看,没有帐号?立即注册 
    
 代码如下:
 import matplotlib.pyplot as plt
 import numpy as np
 import cmaps
 import matplotlib.ticker as mticker
 
 fig = plt.figure(figsize=(8,7))
 # plt.subplots_adjust(left=0.24, right=0.76, top=0.90,bottom=0.3, wspace=0.01, hspace=0.05)
 
 x = list(range(1, 8))
 scatter = plt.scatter(x, x, s=10*np.array(x)**2, c=x, cmap=cmaps.BlGrYeOrReVi200)
 plt.xticks([1, 2, 3, 4, 5, 6], ['2003', '2004', '2005', '2006', '2007', '2008'])
 plt.legend(*scatter.legend_elements(prop='sizes', num = 5, alpha = 0.3), ncol = 5, frameon=False, title = 'Duration(days)')
 fc = fig.colorbar(scatter, extend = 'both', orientation='horizontal', label = 'Averaged magnitude(AOD)', fraction = 0.05)
 fc.outline.set_color('none')
 ax1 = fc.ax
 ax1.tick_params(which='major',direction='out',labelsize=10,length=5)
 ax1.xaxis.set_minor_locator(mticker.MultipleLocator(0.25))
 
 plt.show()
 
 | 
 |