shancx 1.9.33.214__py3-none-any.whl → 1.9.33.215__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
shancx/Plot/plotGlobal.py CHANGED
@@ -180,8 +180,7 @@ def plotScatter(df1, title = "Total number ",saveDir="plotScatter", map_backgrou
180
180
  plotScatter(df2,title = f" Total number of stations ", saveDir="scatter_maps")
181
181
  """
182
182
 
183
- font_path = '/mnt/wtx_weather_forecast/scx/sever7/微软雅黑.ttf'
184
- myfont = mpl.font_manager.FontProperties(fname = font_path, size = 12)
183
+
185
184
  import ssl
186
185
  import urllib.request
187
186
  ssl._create_default_https_context = ssl._create_unverified_context
@@ -192,7 +191,7 @@ import cartopy.crs as ccrs
192
191
  import cartopy.feature as cfeature
193
192
  from cartopy.mpl.ticker import LongitudeFormatter, LatitudeFormatter
194
193
  from hjnwtx.colormap import cmp_hjnwtx
195
- def plotfigPlus(UTCstr, nclon, nclat, cr, fig_title, datatype):
194
+ def plotfigPlus(UTCstr, nclon, nclat, cr, fig_title, datatype,myfont,shp_file="./"):
196
195
  figpath = f"{savepath}/fig/{UTCstr[:4]}/{UTCstr[:8]}/{fig_title}.PNG"
197
196
  lonmin = np.min(nclon)
198
197
  lonmax = np.max(nclon)
@@ -216,7 +215,7 @@ def plotfigPlus(UTCstr, nclon, nclat, cr, fig_title, datatype):
216
215
  ax.yaxis.set_major_formatter(LatitudeFormatter())
217
216
  ax.tick_params(axis='both', labelsize=10)
218
217
  # 3. 叠加自定义的省界矢量(显示在基础地理要素之上)
219
- if os.path.exists(shp_file):
218
+ if os.path.exists(shp_file) and shp_file[-4:]==".shp" :
220
219
  try:
221
220
  shp = gpd.read_file(shp_file).boundary
222
221
  # 使用较细的线宽,避免与国界线混淆
@@ -225,8 +224,7 @@ def plotfigPlus(UTCstr, nclon, nclat, cr, fig_title, datatype):
225
224
  print(f"警告:读取矢量文件 {shp_file} 失败: {e}")
226
225
  else:
227
226
  print(f"警告:矢量文件 {shp_file} 不存在,将只绘制Cartopy地理要素。")
228
- ax.set_title(fig_title, fontsize=12, loc='center', fontproperties=myfont)
229
-
227
+ ax.set_title(fig_title, fontsize=12, loc='center', fontproperties=myfont)
230
228
  # 5. 绘制雷达或降雨数据(在最上层)
231
229
  if datatype == 'radar':
232
230
  clevels = [0, 10, 20, 30, 40, 50, 60, 70]
@@ -248,9 +246,11 @@ def plotfigPlus(UTCstr, nclon, nclat, cr, fig_title, datatype):
248
246
  latArr = np.linspace(27, -13, 2000 )
249
247
  lonArr = np.linspace(70, 150, 4000)
250
248
 
251
- fig_title = f"实况雷达回波_{UTCstr}"
249
+ font_path = '/mnt/wtx_weather_forecast/scx/sever7/微软雅黑.ttf'
250
+ myfont = mpl.font_manager.FontProperties(fname = font_path, size = 12)
251
+ fig_title = f"实况雷达回波_{UTCstr}_test"
252
252
  baseCR[:,900:3700] = CR
253
- plot_figPlus(UTCstr,lonArr,latArr,baseCR,fig_title,datatype="radar")
253
+ plotfigPlus(UTCstr,lonArr,latArr,baseCR,fig_title,datatype="radar",myfont=myfont)
254
254
  fig_title = f"卫星反演雷达回波_{UTCstr}"
255
255
  """
256
256
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shancx
3
- Version: 1.9.33.214
3
+ Version: 1.9.33.215
4
4
  Summary: A simple timer decorator
5
5
  Home-page: https://gitee.com/shancx
6
6
  Author: shancx
@@ -70,7 +70,7 @@ shancx/Plot/Gray2RGB.py,sha256=yDXu1xWVi7OtrS8_ExxK_ev1988kj1ZxoNCWf-kl4Zc,2734
70
70
  shancx/Plot/__init__.py,sha256=_fmDFZfh9HzDPBPKCMPrDT2DsblLVfrO-uFvUg76a74,19194
71
71
  shancx/Plot/draw_day_CR_PNG.py,sha256=ftOYdk80Xmry_H1uaypjrTUA0mJZBV7EGt5T7JfVg0E,7267
72
72
  shancx/Plot/exam.py,sha256=XXyBQp1Eb1siNiu7FY8ACiWH0g43ZSLTOGLqs3aKomE,3966
73
- shancx/Plot/plotGlobal.py,sha256=Qi_6GJ5aVwyw89zG4n57B2gvfHnqX3K2E9qwhO66NyE,16907
73
+ shancx/Plot/plotGlobal.py,sha256=ZB2lHrFbjOYGzPXg2eNE3X0C-PFQa8FGQqp36skdAyU,16973
74
74
  shancx/Plot/radarNmc.py,sha256=ixmoDaoT6whmmrv4wD4p7H_DiNsyOEb2tUoz2KQgDeM,1273
75
75
  shancx/Plot/single_china_map.py,sha256=cRmZW6TtLBwLb-Y3syim_K1jM350CmB5zkK1nrAcaRQ,2116
76
76
  shancx/RdPzl/__init__.py,sha256=I5Isz3KfDgFZAdlRk4D-Hvp-8xH4F2Dl0XGxYGzUcKc,1166
@@ -85,7 +85,7 @@ shancx/Train/multiGpu.py,sha256=D_oZeiSc7VWktpnVDwrFOC1CYZSt9rxOKY5lngE5vFg,820
85
85
  shancx/Train/prepare.py,sha256=vL_8UOA66oZCBIwCICtihsGibivtNgaVJGulJxfNdn8,6793
86
86
  shancx/Train/renet50.py,sha256=wEhYk1X96WE5zuqHqVxWLJa-A5jDNkz4z6edORNufnA,6428
87
87
  shancx/tensBoard/__init__.py,sha256=ga2C5YyJITvvQA1ocpxna_KNFnNRJVwkTjLoIglLZUQ,993
88
- shancx-1.9.33.214.dist-info/METADATA,sha256=r51pqtarBhVXfgqUrbMUiSJJUQW_H3XI1c52MoZkza4,850
89
- shancx-1.9.33.214.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
90
- shancx-1.9.33.214.dist-info/top_level.txt,sha256=akfCS1vKWz3pNmEN_yN9ZiGp-60IQY5ET38mRx_i_-4,7
91
- shancx-1.9.33.214.dist-info/RECORD,,
88
+ shancx-1.9.33.215.dist-info/METADATA,sha256=5lSy1sTRa-1mDSftgFUQSQ2z8qlpvabb7zGE70JOJI8,850
89
+ shancx-1.9.33.215.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
90
+ shancx-1.9.33.215.dist-info/top_level.txt,sha256=akfCS1vKWz3pNmEN_yN9ZiGp-60IQY5ET38mRx_i_-4,7
91
+ shancx-1.9.33.215.dist-info/RECORD,,