Skip to content

Commit

Permalink
TypeError: Dimensions of C (1, 601) are incompatible with X (601) and…
Browse files Browse the repository at this point in the history
…/or Y (2) fixed
  • Loading branch information
YvZheng committed Jun 23, 2022
1 parent 26cd716 commit c6b2c86
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pycwr/draw/RadarPlot.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def plot_vcs(self, ax, start_xy, end_xy, field_name, cmap=None, min_max=None,cma
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,
gci = ax.pcolormesh(mesh_xy[isweep] / 1000., mesh_z[isweep] / 1000., field_data[isweep][:,:-1], cmap=cmaps,
norm=norm, shading='auto', **kwargs)
if cbar:
cb = plt.colorbar(mappable=gci, ax=ax, orientation=orientation)
Expand Down Expand Up @@ -262,7 +262,7 @@ def plot_cappi(self, ax, level_height=3000, cmap=CINRAD_COLORMAP[CINRAD_field_ma
levels = MaxNLocator(nbins=cmap_bins).tick_values(vmin, vmax)
norm = BoundaryNorm(levels, ncolors=cmaps.N, clip=True)
gci = ax.pcolormesh(x / 1000., y / 1000., radar_data, cmap=cmaps, \
zorder=0, norm=norm,shading='auto', **kwargs)
zorder=0, norm=norm, shading='auto', **kwargs)
if cbar:
cb = plt.colorbar(mappable=gci, ax=ax, orientation=orientation)
if cbar_ticks is None:
Expand Down Expand Up @@ -603,7 +603,7 @@ def plot_vcs_map(self, ax, start_lonlat, end_lonlat, field_name, cmap=None, min_
lon_0=self.Radar.scan_info.longitude.values)
mesh_xy, mesh_z, field_data = self.Radar.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,
gci = ax.pcolormesh(mesh_xy[isweep] / 1000., mesh_z[isweep] / 1000., field_data[isweep][:,:-1], cmap=cmaps,
norm=norm, **kwargs)

xticks_data = ax.get_xticks()
Expand Down

0 comments on commit c6b2c86

Please sign in to comment.