- 积分
- 344
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2018-7-5
- 最后登录
- 1970-1-1
|
发表于 2021-3-12 11:51:38
|
显示全部楼层
王老师好,我用subplot画地图想要调整子图之间的间距,应该怎么调整呢?还有一个问题,就是比如我关于一个函数subplot里面参数的调整,我在官网搜subplot出现的参数只有行数、列数等等,关于axestype的说明没有在里面提到,请问是否有关于内部函数比较具体的说明文件呢?
figure(figsize=[1500,1500],newfig=False)
fn1 = 'E:/study/graduate_paper/data/2008.csv'
table = readtable(fn1, delimiter=',', format='%f%f%f%f%f')
frp = table['frp']
lat = table['LAT']
lon = table['LON']
subplot(3,4,1,axestype='map',wspace =0,hspace =0)
lchina = shaperead('E:/study/MI/shp/bou/bou2/bou2_4p.shp')
lchina2 = shaperead('E:/study/MI/shp/bou/bou2/bou2_4l.shp')
bou1_layer1 = geoshow(lchina2,edgecolor='k',size=0.8)
bou1_layer = geoshow(lchina,edgecolor='k',size=0.5)
layer = scatterm(lon, lat, frp, (10,20,30,40,50,60,70),edgecolor=None,size=3)
yaxis(tickvisible=False,location='left',tickwidth=1,linewidth=1.5,ticklength=3) #ticklength刻度线长度,tickwidth刻度线宽度,linewidth边框宽度
yaxis(tickvisible=False,location='right',tickwidth=1,linewidth=1.5,ticklength=3) #分别调试tick的宽度,边框线宽和tick的长度
xaxis(tickvisible=False,location='top',tickwidth=1,linewidth=1.5,ticklength=3)
xaxis(tickvisible=False,location='bottom',tickwidth=1,linewidth=1.5,ticklength=3)
xlim(70,140)
ylim(15,55)
xticks(arange(70, 141, 10),bold=False,fontsize=12)
yticks(arange(15, 56, 10),bold=False,fontsize=12)
text(72, 51, 'a', fontname=u'黑体', fontsize=18)
fn2 = 'E:/study/graduate_paper/data/2009.csv'
table = readtable(fn2, delimiter=',', format='%f%f%f%f%f')
frp = table['frp']
lat = table['LAT']
lon = table['LON']
subplot(3,4,2,axestype='map',wspace =0,hspace =0)
lchina = shaperead('E:/study/MI/shp/bou/bou2/bou2_4p.shp')
lchina2 = shaperead('E:/study/MI/shp/bou/bou2/bou2_4l.shp')
bou1_layer1 = geoshow(lchina2,edgecolor='k',size=0.8)
bou1_layer = geoshow(lchina,edgecolor='k',size=0.5)
layer = scatterm(lon, lat, frp, (10,20,30,40,50,60,70),edgecolor=None,size=3)
yaxis(tickvisible=False,location='left',tickwidth=1,linewidth=1.5,ticklength=3) #ticklength刻度线长度,tickwidth刻度线宽度,linewidth边框宽度
yaxis(tickvisible=False,location='right',tickwidth=1,linewidth=1.5,ticklength=3) #分别调试tick的宽度,边框线宽和tick的长度
xaxis(tickvisible=False,location='top',tickwidth=1,linewidth=1.5,ticklength=3)
xaxis(tickvisible=False,location='bottom',tickwidth=1,linewidth=1.5,ticklength=3)
xlim(70,140)
ylim(15,55)
xticks(arange(70, 141, 10),bold=False,fontsize=12)
yticks(arange(15, 56, 10),bold=False,fontsize=12)
text(72, 51, 'b', fontname=u'黑体', fontsize=18)
fn3 = 'E:/study/graduate_paper/data/2010.csv'
table = readtable(fn3, delimiter=',', format='%f%f%f%f%f')
frp = table['frp']
lat = table['LAT']
lon = table['LON']
subplot(3,4,3,axestype='map')
lchina = shaperead('E:/study/MI/shp/bou/bou2/bou2_4p.shp')
lchina2 = shaperead('E:/study/MI/shp/bou/bou2/bou2_4l.shp')
bou1_layer1 = geoshow(lchina2,edgecolor='k',size=0.8)
bou1_layer = geoshow(lchina,edgecolor='k',size=0.5)
layer = scatterm(lon, lat, frp, (10,20,30,40,50,60,70),edgecolor=None,size=3)
yaxis(tickvisible=False,location='left',tickwidth=1,linewidth=1.5,ticklength=3) #ticklength刻度线长度,tickwidth刻度线宽度,linewidth边框宽度
yaxis(tickvisible=False,location='right',tickwidth=1,linewidth=1.5,ticklength=3) #分别调试tick的宽度,边框线宽和tick的长度
xaxis(tickvisible=False,location='top',tickwidth=1,linewidth=1.5,ticklength=3)
xaxis(tickvisible=False,location='bottom',tickwidth=1,linewidth=1.5,ticklength=3)
xlim(70,140)
ylim(15,55)
xticks(arange(70, 141, 10),bold=False,fontsize=12)
yticks(arange(15, 56, 10),bold=False,fontsize=12)
text(72, 51, 'c', fontname=u'黑体', fontsize=18)
fn4 = 'E:/study/graduate_paper/data/2011.csv'
table = readtable(fn4, delimiter=',', format='%f%f%f%f%f')
frp = table['frp']
lat = table['LAT']
lon = table['LON']
subplot(3,4,4,axestype='map')
lchina = shaperead('E:/study/MI/shp/bou/bou2/bou2_4p.shp')
lchina2 = shaperead('E:/study/MI/shp/bou/bou2/bou2_4l.shp')
bou1_layer1 = geoshow(lchina2,edgecolor='k',size=0.8)
bou1_layer = geoshow(lchina,edgecolor='k',size=0.5)
layer = scatterm(lon, lat, frp, (10,20,30,40,50,60,70),edgecolor=None,size=3)
yaxis(tickvisible=False,location='left',tickwidth=1,linewidth=1.5,ticklength=3) #ticklength刻度线长度,tickwidth刻度线宽度,linewidth边框宽度
yaxis(tickvisible=False,location='right',tickwidth=1,linewidth=1.5,ticklength=3) #分别调试tick的宽度,边框线宽和tick的长度
xaxis(tickvisible=False,location='top',tickwidth=1,linewidth=1.5,ticklength=3)
xaxis(tickvisible=False,location='bottom',tickwidth=1,linewidth=1.5,ticklength=3)
xlim(70,140)
ylim(15,55)
xticks(arange(70, 141, 10),bold=False,fontsize=12)
yticks(arange(15, 56, 10),bold=False,fontsize=12)
text(72, 51, 'd', fontname=u'黑体', fontsize=18)
fn5 = 'E:/study/graduate_paper/data/2012.csv'
table = readtable(fn5, delimiter=',', format='%f%f%f%f%f')
frp = table['frp']
lat = table['LAT']
lon = table['LON']
subplot(3,4,5,axestype='map')
lchina = shaperead('E:/study/MI/shp/bou/bou2/bou2_4p.shp')
lchina2 = shaperead('E:/study/MI/shp/bou/bou2/bou2_4l.shp')
bou1_layer1 = geoshow(lchina2,edgecolor='k',size=0.8)
bou1_layer = geoshow(lchina,edgecolor='k',size=0.5)
layer = scatterm(lon, lat, frp, (10,20,30,40,50,60,70),edgecolor=None,size=3)
yaxis(tickvisible=False,location='left',tickwidth=1,linewidth=1.5,ticklength=3) #ticklength刻度线长度,tickwidth刻度线宽度,linewidth边框宽度
yaxis(tickvisible=False,location='right',tickwidth=1,linewidth=1.5,ticklength=3) #分别调试tick的宽度,边框线宽和tick的长度
xaxis(tickvisible=False,location='top',tickwidth=1,linewidth=1.5,ticklength=3)
xaxis(tickvisible=False,location='bottom',tickwidth=1,linewidth=1.5,ticklength=3)
xlim(70,140)
ylim(15,55)
xticks(arange(70, 141, 10),bold=False,fontsize=12)
yticks(arange(15, 56, 10),bold=False,fontsize=12)
text(72, 51, 'e', fontname=u'黑体', fontsize=18)
fn6 = 'E:/study/graduate_paper/data/2013.csv'
table = readtable(fn6, delimiter=',', format='%f%f%f%f%f')
frp = table['frp']
lat = table['LAT']
lon = table['LON']
subplot(3,4,6,axestype='map')
lchina = shaperead('E:/study/MI/shp/bou/bou2/bou2_4p.shp')
lchina2 = shaperead('E:/study/MI/shp/bou/bou2/bou2_4l.shp')
bou1_layer1 = geoshow(lchina2,edgecolor='k',size=0.8)
bou1_layer = geoshow(lchina,edgecolor='k',size=0.5)
layer = scatterm(lon, lat, frp, (10,20,30,40,50,60,70),edgecolor=None,size=3)
yaxis(tickvisible=False,location='left',tickwidth=1,linewidth=1.5,ticklength=3) #ticklength刻度线长度,tickwidth刻度线宽度,linewidth边框宽度
yaxis(tickvisible=False,location='right',tickwidth=1,linewidth=1.5,ticklength=3) #分别调试tick的宽度,边框线宽和tick的长度
xaxis(tickvisible=False,location='top',tickwidth=1,linewidth=1.5,ticklength=3)
xaxis(tickvisible=False,location='bottom',tickwidth=1,linewidth=1.5,ticklength=3)
xlim(70,140)
ylim(15,55)
xticks(arange(70, 141, 10),bold=False,fontsize=12)
yticks(arange(15, 56, 10),bold=False,fontsize=12)
text(72, 51, 'f', fontname=u'黑体', fontsize=18)
fn7 = 'E:/study/graduate_paper/data/2014.csv'
table = readtable(fn7, delimiter=',', format='%f%f%f%f%f')
frp = table['frp']
lat = table['LAT']
lon = table['LON']
subplot(3,4,7,axestype='map')
lchina = shaperead('E:/study/MI/shp/bou/bou2/bou2_4p.shp')
lchina2 = shaperead('E:/study/MI/shp/bou/bou2/bou2_4l.shp')
bou1_layer1 = geoshow(lchina2,edgecolor='k',size=0.8)
bou1_layer = geoshow(lchina,edgecolor='k',size=0.5)
layer = scatterm(lon, lat, frp, (10,20,30,40,50,60,70),edgecolor=None,size=3)
yaxis(tickvisible=False,location='left',tickwidth=1,linewidth=1.5,ticklength=3) #ticklength刻度线长度,tickwidth刻度线宽度,linewidth边框宽度
yaxis(tickvisible=False,location='right',tickwidth=1,linewidth=1.5,ticklength=3) #分别调试tick的宽度,边框线宽和tick的长度
xaxis(tickvisible=False,location='top',tickwidth=1,linewidth=1.5,ticklength=3)
xaxis(tickvisible=False,location='bottom',tickwidth=1,linewidth=1.5,ticklength=3)
xlim(70,140)
ylim(15,55)
xticks(arange(70, 141, 10),bold=False,fontsize=12)
yticks(arange(15, 56, 10),bold=False,fontsize=12)
text(72, 51, 'g', fontname=u'黑体', fontsize=18)
fn8 = 'E:/study/graduate_paper/data/2015.csv'
table = readtable(fn8, delimiter=',', format='%f%f%f%f%f')
frp = table['frp']
lat = table['LAT']
lon = table['LON']
subplot(3,4,8,axestype='map')
lchina = shaperead('E:/study/MI/shp/bou/bou2/bou2_4p.shp')
lchina2 = shaperead('E:/study/MI/shp/bou/bou2/bou2_4l.shp')
bou1_layer1 = geoshow(lchina2,edgecolor='k',size=0.8)
bou1_layer = geoshow(lchina,edgecolor='k',size=0.5)
layer = scatterm(lon, lat, frp, (10,20,30,40,50,60,70),edgecolor=None,size=3)
yaxis(tickvisible=False,location='left',tickwidth=1,linewidth=1.5,ticklength=3) #ticklength刻度线长度,tickwidth刻度线宽度,linewidth边框宽度
yaxis(tickvisible=False,location='right',tickwidth=1,linewidth=1.5,ticklength=3) #分别调试tick的宽度,边框线宽和tick的长度
xaxis(tickvisible=False,location='top',tickwidth=1,linewidth=1.5,ticklength=3)
xaxis(tickvisible=False,location='bottom',tickwidth=1,linewidth=1.5,ticklength=3)
xlim(70,140)
ylim(15,55)
xticks(arange(70, 141, 10),bold=False,fontsize=12)
yticks(arange(15, 56, 10),bold=False,fontsize=12)
text(72, 51, 'h', fontname=u'黑体', fontsize=18)
fn9 = 'E:/study/graduate_paper/data/2016.csv'
table = readtable(fn9, delimiter=',', format='%f%f%f%f%f')
frp = table['frp']
lat = table['LAT']
lon = table['LON']
subplot(3,4,9,axestype='map')
lchina = shaperead('E:/study/MI/shp/bou/bou2/bou2_4p.shp')
lchina2 = shaperead('E:/study/MI/shp/bou/bou2/bou2_4l.shp')
bou1_layer1 = geoshow(lchina2,edgecolor='k',size=0.8)
bou1_layer = geoshow(lchina,edgecolor='k',size=0.5)
layer = scatterm(lon, lat, frp, (10,20,30,40,50,60,70),edgecolor=None,size=3)
yaxis(tickvisible=False,location='left',tickwidth=1,linewidth=1.5,ticklength=3) #ticklength刻度线长度,tickwidth刻度线宽度,linewidth边框宽度
yaxis(tickvisible=False,location='right',tickwidth=1,linewidth=1.5,ticklength=3) #分别调试tick的宽度,边框线宽和tick的长度
xaxis(tickvisible=False,location='top',tickwidth=1,linewidth=1.5,ticklength=3)
xaxis(tickvisible=False,location='bottom',tickwidth=1,linewidth=1.5,ticklength=3)
xlim(70,140)
ylim(15,55)
xticks(arange(70, 141, 10),bold=False,fontsize=12)
yticks(arange(15, 56, 10),bold=False,fontsize=12)
text(72, 51, 'i', fontname=u'黑体', fontsize=18)
fn10 = 'E:/study/graduate_paper/data/2017.csv'
table = readtable(fn10, delimiter=',', format='%f%f%f%f%f')
frp = table['frp']
lat = table['LAT']
lon = table['LON']
subplot(3,4,10,axestype='map')
lchina = shaperead('E:/study/MI/shp/bou/bou2/bou2_4p.shp')
lchina2 = shaperead('E:/study/MI/shp/bou/bou2/bou2_4l.shp')
bou1_layer1 = geoshow(lchina2,edgecolor='k',size=0.8)
bou1_layer = geoshow(lchina,edgecolor='k',size=0.5)
layer = scatterm(lon, lat, frp, (10,20,30,40,50,60,70),edgecolor=None,size=3)
yaxis(tickvisible=False,location='left',tickwidth=1,linewidth=1.5,ticklength=3) #ticklength刻度线长度,tickwidth刻度线宽度,linewidth边框宽度
yaxis(tickvisible=False,location='right',tickwidth=1,linewidth=1.5,ticklength=3) #分别调试tick的宽度,边框线宽和tick的长度
xaxis(tickvisible=False,location='top',tickwidth=1,linewidth=1.5,ticklength=3)
xaxis(tickvisible=False,location='bottom',tickwidth=1,linewidth=1.5,ticklength=3)
xlim(70,140)
ylim(15,55)
xticks(arange(70, 141, 10),bold=False,fontsize=12)
yticks(arange(15, 56, 10),bold=False,fontsize=12)
text(72, 51, 'j', fontname=u'黑体', fontsize=18)
fn11 = 'E:/study/graduate_paper/data/2018.csv'
table = readtable(fn11, delimiter=',', format='%f%f%f%f%f')
frp = table['frp']
lat = table['LAT']
lon = table['LON']
subplot(3,4,11,axestype='map')
lchina = shaperead('E:/study/MI/shp/bou/bou2/bou2_4p.shp')
lchina2 = shaperead('E:/study/MI/shp/bou/bou2/bou2_4l.shp')
bou1_layer1 = geoshow(lchina2,edgecolor='k',size=0.8)
bou1_layer = geoshow(lchina,edgecolor='k',size=0.5)
layer = scatterm(lon, lat, frp, (10,20,30,40,50,60,70),edgecolor=None,size=3)
yaxis(tickvisible=False,location='left',tickwidth=1,linewidth=1.5,ticklength=3) #ticklength刻度线长度,tickwidth刻度线宽度,linewidth边框宽度
yaxis(tickvisible=False,location='right',tickwidth=1,linewidth=1.5,ticklength=3) #分别调试tick的宽度,边框线宽和tick的长度
xaxis(tickvisible=False,location='top',tickwidth=1,linewidth=1.5,ticklength=3)
xaxis(tickvisible=False,location='bottom',tickwidth=1,linewidth=1.5,ticklength=3)
xlim(70,140)
ylim(15,55)
xticks(arange(70, 141, 10),bold=False,fontsize=12)
yticks(arange(15, 56, 10),bold=False,fontsize=12)
text(72, 51, 'k', fontname=u'黑体', fontsize=18)
fn12 = 'E:/study/graduate_paper/data/2019.csv'
table = readtable(fn12, delimiter=',', format='%f%f%f%f%f')
frp = table['frp']
lat = table['LAT']
lon = table['LON']
subplot(3,4,12,axestype='map')
lchina = shaperead('E:/study/MI/shp/bou/bou2/bou2_4p.shp')
lchina2 = shaperead('E:/study/MI/shp/bou/bou2/bou2_4l.shp')
bou1_layer1 = geoshow(lchina2,edgecolor='k',size=0.8)
bou1_layer = geoshow(lchina,edgecolor='k',size=0.5)
layer = scatterm(lon, lat, frp, (10,20,30,40,50,60,70),edgecolor=None,size=3)
yaxis(tickvisible=False,location='left',tickwidth=1,linewidth=1.5,ticklength=3) #ticklength刻度线长度,tickwidth刻度线宽度,linewidth边框宽度
yaxis(tickvisible=False,location='right',tickwidth=1,linewidth=1.5,ticklength=3) #分别调试tick的宽度,边框线宽和tick的长度
xaxis(tickvisible=False,location='top',tickwidth=1,linewidth=1.5,ticklength=3)
xaxis(tickvisible=False,location='bottom',tickwidth=1,linewidth=1.5,ticklength=3)
xlim(70,140)
ylim(15,55)
xticks(arange(70, 141, 10),bold=False,fontsize=12)
yticks(arange(15, 56, 10),bold=False,fontsize=12)
text(72, 51, 'l', fontname=u'黑体', fontsize=18)
colorbar(layer,orientation='horizontal', extendrect=False, shrink=0.8, aspect=12)
savefig('E:/study/graduate_paper/figure/year08-19.png',dpi=300,width=950, height=610) |
|