Skip to content

Commit

Permalink
Merge pull request #294 from justin-richling/bad-polar
Browse files Browse the repository at this point in the history
Remove `transform_first` from Polar plots
  • Loading branch information
justin-richling authored Mar 26, 2024
2 parents b961522 + af3f6c5 commit 4c40fd3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/plotting_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,20 +760,20 @@ def make_polar_plot(wks, case_nickname, base_nickname,
levs_diff = np.unique(np.array(levelsdiff))

if len(levs) < 2:
img1 = ax1.contourf(lons, lats, d1_cyclic, transform=ccrs.PlateCarree(), transform_first=True, colors="w", norm=norm1)
img1 = ax1.contourf(lons, lats, d1_cyclic, transform=ccrs.PlateCarree(), colors="w", norm=norm1)
ax1.text(0.4, 0.4, empty_message, transform=ax1.transAxes, bbox=props)

img2 = ax2.contourf(lons, lats, d2_cyclic, transform=ccrs.PlateCarree(), transform_first=True, colors="w", norm=norm1)
img2 = ax2.contourf(lons, lats, d2_cyclic, transform=ccrs.PlateCarree(), colors="w", norm=norm1)
ax2.text(0.4, 0.4, empty_message, transform=ax2.transAxes, bbox=props)
else:
img1 = ax1.contourf(lons, lats, d1_cyclic, transform=ccrs.PlateCarree(), transform_first=True, cmap=cmap1, norm=norm1, levels=levels1)
img2 = ax2.contourf(lons, lats, d2_cyclic, transform=ccrs.PlateCarree(), transform_first=True, cmap=cmap1, norm=norm1, levels=levels1)
img1 = ax1.contourf(lons, lats, d1_cyclic, transform=ccrs.PlateCarree(), cmap=cmap1, norm=norm1, levels=levels1)
img2 = ax2.contourf(lons, lats, d2_cyclic, transform=ccrs.PlateCarree(), cmap=cmap1, norm=norm1, levels=levels1)

if len(levs_diff) < 2:
img3 = ax3.contourf(lons, lats, dif_cyclic, transform=ccrs.PlateCarree(), transform_first=True, colors="w", norm=dnorm)
img3 = ax3.contourf(lons, lats, dif_cyclic, transform=ccrs.PlateCarree(), colors="w", norm=dnorm)
ax3.text(0.4, 0.4, empty_message, transform=ax3.transAxes, bbox=props)
else:
img3 = ax3.contourf(lons, lats, dif_cyclic, transform=ccrs.PlateCarree(), transform_first=True, cmap=cmapdiff, norm=dnorm, levels=levelsdiff)
img3 = ax3.contourf(lons, lats, dif_cyclic, transform=ccrs.PlateCarree(), cmap=cmapdiff, norm=dnorm, levels=levelsdiff)

#Set Main title for subplots:
st = fig.suptitle(wks.stem[:-5].replace("_"," - "), fontsize=18)
Expand Down

0 comments on commit 4c40fd3

Please sign in to comment.