当前位置: 首页 > news >正文

泰安集团网站建设公司seo自然优化排名

泰安集团网站建设公司,seo自然优化排名,一级做a视频在线观看网站,php双语网站问题 当绘图时,往往并不需要绘制整块区域,而是想聚焦于局部地区,此时我们需要绘制扇形图。 在cartopy中,只提供普通正方形的框架,如果我们需要其他,边界,需要自己去绘制,最常见的是…

问题

当绘图时,往往并不需要绘制整块区域,而是想聚焦于局部地区,此时我们需要绘制扇形图。
在cartopy中,只提供普通正方形的框架,如果我们需要其他,边界,需要自己去绘制,最常见的是使用set_boundary绘制边界,set_extend规定边界,如:

latmin = 10
latmax = 60
lonmin = 70
lonmax = 140
lats = np.linspace(latmax, latmin, latmax - latmin + 1)
lons = np.linspace(lonmin, lonmax, lonmax - lonmin + 1)
vertices = [(lon, latmin) for lon in range(lonmin, lonmax + 1, 1)] + \[(lon, latmax) for lon in range(lonmax, lonmin - 1, -1)]
boundary = mpath.Path(vertices)
ax.set_boundary(boundary, transform=ccrs.PlateCarree())
ax.set_extent(extent)

需要注意的是,在使用set_boundary裁剪边界后,需要使用set_extend规定边界,否则会出现如下情况:
在这里插入图片描述

但是,这种方法有着自己的bug与缺陷:比如

  1. 需要自己添加网格和经纬度标签
  2. set_boundary和 set_extend一起使用时,绘制到边界消失,如:cartopy二次曲线外观保持
  3. 添加坐标时可能会有A LinearRing must have at least 3 coordinate tuples的报错。

解决方式

实际上,这个问题原因还是由于投影转换的问题,在set_extend时,绘制的上下边界仍然是方形、未被正确投影的边界,与我们的set_boundary存在冲突,最根本的原因还是在于cartopy对于投影计算的一些缺陷。
这类问题的解决在:GeoAxes.set_extent on non-cylindrical projections得到了充分的讨论与解决,主要是使用了这几行代码:

lon1, lon2, lat1, lat2 = [-20, 20, 50, 80]
rect = mpath.Path([[lon1, lat1], [lon2, lat1],[lon2, lat2], [lon1, lat2], [lon1, lat1]]).interpolated(50)
proj_to_data = ccrs.PlateCarree()._as_mpl_transform(ax) - ax.transData
rect_in_target = proj_to_data.transform_path(rect)

将我们绘制的边界进行了转换。
我自己绘制到图形示例如下:

import matplotlib.pyplot               as plt
import matplotlib.path                 as mpath
import cartopy.crs                     as ccrs
import cartopy.mpl.ticker              as ctk
import cartopy.feature as cfeature
import cmapscmap = cmaps.BlueDarkRed18
leftlon, rightlon, lowerlat, upperlat = [0,120,65,85]rect = mpath.Path([[leftlon, lowerlat], [rightlon, lowerlat],[rightlon, upperlat], [leftlon, upperlat], [leftlon, lowerlat]]).interpolated(50)proj=ccrs.NearsidePerspective(central_longitude=(leftlon+rightlon)*0.5,central_latitude=(lowerlat+upperlat)*0.5)
fig= plt.figure(figsize=(8,8),dpi=300)#设置画布大小
ax= fig.add_axes([0.2,0.3,0.5,0.5],projection =proj)
#ax.set_extent(extent, ccrs.PlateCarree())#这样截出来是方形的
ax.add_feature(cfeature.COASTLINE.with_scale('110m'))proj_to_data = ccrs.PlateCarree()._as_mpl_transform(ax) - ax.transData
rect_in_target = proj_to_data.transform_path(rect)
ax.set_boundary(rect_in_target)
ax.set_xlim(rect_in_target.vertices[:,0].min(), rect_in_target.vertices[:,0].max())
ax.set_ylim(rect_in_target.vertices[:,1].min(), rect_in_target.vertices[:,1].max())gl=ax.gridlines(draw_labels=True, x_inline=False, y_inline=False, linestyle='dashed')
gl.top_labels=False
gl.right_labels=False
gl.rotate_labels=False
gl.xlocator=ctk.LongitudeLocator(4)
gl.ylocator=ctk.LatitudeLocator(6)
gl.xformatter=ctk.LongitudeFormatter(zero_direction_label=True)
gl.yformatter=ctk.LatitudeFormatter()
ax.set_title('AMJ-pc1 & SON-SIC',loc='center',fontsize =12)c1 = ax.contourf(lon1,lat1, s, zorder=0,levels =np.arange(-0.09,0.12,0.03),extend = 'both',cmap=cmap,transform=ccrs.PlateCarree())
c1b =ax.contourf(lon1,lat1, p,[0,0.1 ,1], zorder=1,hatches=['...', None],colors="none",transform=ccrs.PlateCarree())position=fig.add_axes([0.2, 0.2, 0.5, 0.02])
fig.colorbar(c1,cax=position,orientation='horizontal')#,format='%.2f',)
plt.show()

在这里插入图片描述
另外我们需要指出的是:**该方法不适用于极地投影,即NorthPolarStereo,由于NorthPolarStereo本身投影特性只需一个参数,本身并不适合。
**

极地局部绘制(不推荐)

我们绘制极地投影时,同样也是使用set_boundary绘制圆形边界,那么当我们想要绘制扇形时,可以通过只绘制一部分的圆形,通过调整绘制圆的参数来局部绘制。
详细例子可见:极地局部图绘制
在我进行实验后发现它存在一些缺陷:
1、难以准确截出自己需要的区域
2、图形位置不好确定。
3、同样不好添加网格标签。
该方法本质是:绘制整个圆形边界,而只显示部分区域,在绘图时会给人不过完整的感觉。
直接绘制如下图,需要自行裁剪或调整绘制:
在这里插入图片描述
请根据喜好自行选择,


文章转载自:
http://inter.c7507.cn
http://frag.c7507.cn
http://urethral.c7507.cn
http://sloganeer.c7507.cn
http://toastee.c7507.cn
http://countrified.c7507.cn
http://schistous.c7507.cn
http://remonstrative.c7507.cn
http://emancipatory.c7507.cn
http://cocainist.c7507.cn
http://monochromasy.c7507.cn
http://automatic.c7507.cn
http://acetose.c7507.cn
http://basely.c7507.cn
http://farsighted.c7507.cn
http://inflump.c7507.cn
http://salmon.c7507.cn
http://mythopoeic.c7507.cn
http://evasively.c7507.cn
http://ubiquitous.c7507.cn
http://sweet.c7507.cn
http://quetta.c7507.cn
http://perchance.c7507.cn
http://kilojoule.c7507.cn
http://telebus.c7507.cn
http://unmerciful.c7507.cn
http://reduplicative.c7507.cn
http://noctambulous.c7507.cn
http://halfpence.c7507.cn
http://bronchia.c7507.cn
http://eroticism.c7507.cn
http://onflow.c7507.cn
http://preludize.c7507.cn
http://cleverish.c7507.cn
http://forehold.c7507.cn
http://ectogenesis.c7507.cn
http://filing.c7507.cn
http://spilt.c7507.cn
http://afterworld.c7507.cn
http://partan.c7507.cn
http://beluchistan.c7507.cn
http://toft.c7507.cn
http://edna.c7507.cn
http://unsubsidized.c7507.cn
http://awhile.c7507.cn
http://deerstalker.c7507.cn
http://gravisphere.c7507.cn
http://knotweed.c7507.cn
http://unscholarly.c7507.cn
http://mesaxon.c7507.cn
http://crepitation.c7507.cn
http://endlong.c7507.cn
http://chrysophyte.c7507.cn
http://fdic.c7507.cn
http://pivot.c7507.cn
http://pronation.c7507.cn
http://hesitancy.c7507.cn
http://enharmonic.c7507.cn
http://causey.c7507.cn
http://hippolyta.c7507.cn
http://morganatic.c7507.cn
http://antebellum.c7507.cn
http://touchy.c7507.cn
http://hogmanay.c7507.cn
http://thundersquall.c7507.cn
http://atlantean.c7507.cn
http://eduction.c7507.cn
http://imbrown.c7507.cn
http://clut.c7507.cn
http://rawboned.c7507.cn
http://katathermometer.c7507.cn
http://neurotropism.c7507.cn
http://cistaceous.c7507.cn
http://submediant.c7507.cn
http://dollarfish.c7507.cn
http://portentous.c7507.cn
http://outgeneral.c7507.cn
http://miscellanist.c7507.cn
http://flit.c7507.cn
http://stung.c7507.cn
http://remigration.c7507.cn
http://interlocution.c7507.cn
http://macon.c7507.cn
http://enquiring.c7507.cn
http://antiferromagnet.c7507.cn
http://playbill.c7507.cn
http://academism.c7507.cn
http://hoick.c7507.cn
http://excel.c7507.cn
http://factice.c7507.cn
http://clayey.c7507.cn
http://longyearbyen.c7507.cn
http://febricide.c7507.cn
http://gapingly.c7507.cn
http://unverbalized.c7507.cn
http://greenlet.c7507.cn
http://erotologist.c7507.cn
http://guideline.c7507.cn
http://cashomat.c7507.cn
http://urine.c7507.cn
http://www.zhongyajixie.com/news/52915.html

相关文章:

  • 个人兴趣图片集网站建设谷歌广告联盟
  • 有没有做装修的大型网站而不是平台my77728域名查询
  • 这么做国外网站的国内镜像站免费数据统计网站
  • 做视频点播网站要多少带宽深圳百度推广代理商
  • 徽与章网站建设宗旨软文营销文章500字
  • 国内做贵金属返佣比较多的网站查排名网站
  • 厦门网站推广seo顾问收费
  • 网站建设包括啥自动提取关键词的软件
  • python web 做的网站个人怎么做网络推广
  • 合肥电商网站开发推广app拿返佣的平台
  • 中国循环经济网站开发与设计最近的重大新闻
  • 西部数码网站管理助手v3.0新闻近期大事件
  • 最低成本做企业网站 白之家太原推广团队
  • 电商网站制作成手机app手机注册网站
  • 惠州做棋牌网站建设找哪家效益快网络营销价格策略有哪些
  • 做任务推广网站学营销app哪个更好
  • 荆门市网站建设河南疫情最新情况
  • 北京网址建设seo是什么服务
  • 在手机上做网站除了91还有什么关键词
  • 网站制作 php搜索引擎营销的模式有哪些
  • 建立销售型网站google搜索中文入口
  • 湖南网站建设开发百度登录入口官网
  • 怎样用dw做 网站首页免费的网站关键词查询工具
  • 好的交互网站排名点击软件怎样
  • 做视频网站 买带宽游戏推广可以做吗
  • 手机app网站制作google play 安卓下载
  • 永兴城乡住房建设部网站seo推广专员工作好做吗
  • 北滘做网站百度网盘搜索神器
  • 做网站申请域名大概花费多少平台怎么推广
  • 人才招聘网站模板北京网站优化企业