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

建设局网站策划书电视台网站建设方案

建设局网站策划书,电视台网站建设方案,潍坊网站收录,预告网站正在建设中【python海洋专题九】Cartopy画地形等深线图 水深图基础差不多了#xff0c;可以换成温度、盐度等 本期加上等深线 本期内容 1#xff1a;地形等深线 cf ax.contour(lon, lat, ele[:, :], levelsnp.linspace(-9000,-100,10),colorsgray, linestyles-,linewidths0.25, t…【python海洋专题九】Cartopy画地形等深线图 水深图基础差不多了可以换成温度、盐度等 本期加上等深线 本期内容 1地形等深线 cf ax.contour(lon, lat, ele[:, :], levelsnp.linspace(-9000,-100,10),colorsgray, linestyles-,linewidths0.25, transformccrs.PlateCarree())2改变颜色 colorsgray3改变粗细 linewidths1数字越大线条越粗。4特定等值线 levels[-9000, -8000, -5000, -3000, -1000, -300]想画哪条填写对应数字。5特定线条特定颜色和粗细 cf ax.contour(lon, lat, ele[:, :], levels[-8000,-6000,-4000,-2000,-200],colorsk, linestyles-,linewidths0.3, transformccrs.PlateCarree()) cf ax.contour(lon, lat, ele[:, :], levels[-3000],colorsr, linestyles-,linewidths0.5, transformccrs.PlateCarree())6线条样式 linestyles-. 图片 图片 图片 图片 图片 图片 7显示数字 ax.clabel(cf,inlineTrue,fmt‘%.f’,fontsize3.5) 出现错误不会了 ‘codes’ must be a 1D list or array with the same length of ‘vertices’. Your vertices have shape (2, 2) but your codes have shape (1,) 8填充加上等值线 参考文献及其在本文中的作用 Python气象绘图笔记五——等高线 - 知乎 (zhihu.com) 【python海洋专题一】查看数据nc文件的属性并输出属性到txt文件 【python海洋专题二】读取水深nc文件并水深地形图 【python海洋专题三】图像修饰之画布和坐标轴 【Python海洋专题四】之水深地图图像修饰 【Python海洋专题五】之水深地形图海岸填充 【Python海洋专题六】之Cartopy画地形水深图 【python海洋专题】测试数据 【Python海洋专题七】Cartopy画地形水深图的陆地填充 【python海洋专题八】Cartopy画地形水深图的contourf填充间隔数调整 # -*- coding: utf-8 -*- # %% # Importing related function packages import matplotlib.pyplot as plt import cartopy.crs as ccrs import cartopy.feature as feature import numpy as np import matplotlib.ticker as ticker from cartopy import mpl from cartopy.mpl.ticker import LongitudeFormatter, LatitudeFormatter from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER from matplotlib.font_manager import FontProperties from netCDF4 import Dataset from palettable.cmocean.diverging import Delta_4 from palettable.colorbrewer.sequential import GnBu_9 from palettable.colorbrewer.sequential import Blues_9 from palettable.scientific.diverging import Roma_20 from pylab import * def reverse_colourmap(cmap, namemy_cmap_r):reverse []k []for key in cmap._segmentdata:k.append(key)channel cmap._segmentdata[key]data []for t in channel:data.append((1 - t[0], t[2], t[1]))reverse.append(sorted(data))LinearL dict(zip(k, reverse))my_cmap_r mpl.colors.LinearSegmentedColormap(name, LinearL)return my_cmap_rcmap Blues_9.mpl_colormap cmap_r reverse_colourmap(cmap) cmap1 GnBu_9.mpl_colormap cmap_r1 reverse_colourmap(cmap1) cmap2 Roma_20.mpl_colormap cmap_r2 reverse_colourmap(cmap2) # read data a Dataset(D:\pycharm_work\data\scs_etopo.nc) print(a) lon a.variables[lon][:] lat a.variables[lat][:] ele a.variables[elevation][:] # 图三 # 设置地图全局属性 scale 50m plt.rcParams[font.sans-serif] [Times New Roman] # 设置整体的字体为Times New Roman fig plt.figure(dpi300, figsize(3, 2), facecolorw, edgecolorblue)#设置一个画板将其返还给fig ax fig.add_axes([0.05, 0.08, 0.92, 0.8], projectionccrs.PlateCarree(central_longitude180)) ax.set_extent([105, 125, 0, 25], crsccrs.PlateCarree())# 设置显示范围 land feature.NaturalEarthFeature(physical, land, scale, edgecolorface,facecolorfeature.COLORS[land]) ax.add_feature(land, facecolor0.6) ax.add_feature(feature.COASTLINE.with_scale(50m), lw0.3)#添加海岸线关键字lw设置线宽;linestyle设置线型 cs ax.contourf(lon, lat, ele[:, :], levelsnp.arange(-9000,0,20),extendboth,cmapcmap_r1, transformccrs.PlateCarree()) # ------colorbar设置 cb plt.colorbar(cs, axax, extendboth, orientationvertical,ticksnp.linspace(-9000, 0, 10)) cb.set_label(depth, fontsize4, colork)#设置colorbar的标签字体及其大小 cb.ax.tick_params(labelsize4, directionin) #设置colorbar刻度字体大小。 cf ax.contour(lon, lat, ele[:, :], levels[-5000,-2000,-500,-300,-100,-50,-10],colorsgray, linestyles-,linewidths0.2,transformccrs.PlateCarree()) #ax.clabel(cf, inlineTrue, fontsize8, colorsred, fmt%1.0f,manualFalse)#ax.clabel(cf,inlineTrue,fmt%.f,fontsize3.5)# 添加标题 ax.set_title(Etopo, fontsize4) # 利用Formatter格式化刻度标签 ax.set_xticks(np.arange(107, 125, 4), crsccrs.PlateCarree())#添加经纬度 ax.set_xticklabels(np.arange(107, 125, 4), fontsize4) ax.set_yticks(np.arange(0, 25, 2), crsccrs.PlateCarree()) ax.set_yticklabels(np.arange(0, 25, 2), fontsize4) ax.xaxis.set_major_formatter(LongitudeFormatter()) ax.yaxis.set_major_formatter(LatitudeFormatter()) ax.tick_params(colork, directionin)#更改刻度指向为朝内颜色设置为蓝色 gl ax.gridlines(crsccrs.PlateCarree(), draw_labelsFalse, xlocsnp.arange(107, 125, 4), ylocsnp.arange(0, 25, 2),linewidth0.25, linestyle--, colork, alpha0.8)#添加网格线 gl.top_labels, gl.bottom_labels, gl.right_labels, gl.left_labels False, False, False, False plt.savefig(scs_elevation1.jpg, dpi600, bbox_inchestight, pad_inches0.1) # 输出地图并设置边框空白紧密 plt.show()
http://www.hkea.cn/news/14269677/

相关文章:

  • 怎么在网上做装修网站没有域名怎么搭建网站
  • 找个人合伙做网站深圳工业设计公司排行榜
  • 泰安网站建设制作服务外贸公司网址
  • 把网站生成app的免费平台商业网点建设中心网站
  • 企业手机网站程序是什么软件开发公司哪里好
  • 关于咖啡厅网站建设的论文直播网站建设方案
  • 狠狠做网站 百度一下网站开发怎么入驻京东
  • 石碣网站建设淮安制作网站在那里
  • 大朗镇住房规划建设局网站东莞建设年审网站
  • 网站建设的解决办法网站外链优化
  • 现在做网站到底需要多少钱wordpress插件销售
  • 做企业网站需要注意什么鞍山市城市建设网站
  • 南宁微网站制作宿州品牌网站建设公司
  • 做网站发布信息趣夜传媒
  • 山东做网站公司哪家好重庆市建设工程管理信息网
  • 成都网站优化实战图片压缩wordpress
  • 网站上线过程ui设计做兼职的网站有哪些
  • 黄页网络的推广网站有哪些类型网站设计怎么用黑色
  • 有可以做推广的网站吗网站后台基本功能
  • 网站建设 业务员wordpress文章类插件
  • ppt网站模板网站建设与制作
  • 购物网站开发视频教程美橙网站产品详情
  • 做花茶网站解说网站建设方案策划书ppt
  • 内蒙住房和城乡建设部网站首页太原网站建设小程序
  • 网站建设在哪里进行网站首页快速收录
  • 广州做蛋糕的网站wordpress 微信连接数据库文件
  • 深圳小企业网站建设谷歌广告投放步骤
  • 网站表单功能微站网
  • 科汛 kesioncms v8.05 企业网站建设入门视频教程wordpress权限数字
  • 电子商务网站开发形式有小程序开发员