Skip to content

Commit

Permalink
fix vcs error
Browse files Browse the repository at this point in the history
  • Loading branch information
YvZheng committed Jul 20, 2022
1 parent c6b2c86 commit ecebacb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pycwr/draw/VerticalSectionPlot.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,12 @@ def SectionPlot_VCS(fig, ax, cx, mesh_xy, mesh_z, field_data, height=(0, 18), ti
clabel = ""
if continuously:
cmap_bins = 256
min_h, max_h = height
min_h, max_h = heigh
cmaps = plt.get_cmap(cmap)
levels = MaxNLocator(nbins=cmap_bins).tick_values(vmin, vmax)
norm = BoundaryNorm(levels, ncolors=cmaps.N, clip=True)
for isweep, _ in enumerate(mesh_xy):
gci = ax.pcolormesh(mesh_xy[isweep] / 1000., mesh_z[isweep] / 1000., field_data[isweep], cmap=cmaps, norm=norm)
gci = ax.pcolormesh(mesh_xy[isweep] / 1000., mesh_z[isweep] / 1000., field_data[isweep][:,:-1], cmap=cmaps, norm=norm)
ax.set_xlabel(xlabel, fontsize=14)
ax.set_ylabel(ylabel, fontsize=14)
ax.set_title(title, fontsize=16)
Expand Down Expand Up @@ -302,7 +302,7 @@ def SectionPlot_VCS_map(fig, ax, cx, start_lonlat, end_lonlat, field_name, NRada
end_x, end_y = geographic_to_cartesian_aeqd(lat=end_lonlat[1], lon=end_lonlat[0], lat_0=lat_0, lon_0=lon_0)
mesh_xy, mesh_z, field_data = NRadar.get_vcs_data((start_x[0], start_y[0]), (end_x[0], end_y[0]), field_name)
for isweep, _ in enumerate(mesh_xy):
gci = ax.pcolormesh(mesh_xy[isweep] / 1000., mesh_z[isweep] / 1000., field_data[isweep], cmap=cmaps, norm=norm)
gci = ax.pcolormesh(mesh_xy[isweep] / 1000., mesh_z[isweep] / 1000., field_data[isweep][:,:-1], cmap=cmaps, norm=norm)
ax.set_xlabel(xlabel, fontsize=14)
ax.set_ylabel(ylabel, fontsize=14)
ax.set_title(title, fontsize=16)
Expand Down

0 comments on commit ecebacb

Please sign in to comment.