Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No colorbar_orient option in pyart.graph.RadarMapDisplay.plot_ppi_map() #1400

Closed
joshua-hampton opened this issue Mar 16, 2023 · 3 comments · Fixed by #1401
Closed

No colorbar_orient option in pyart.graph.RadarMapDisplay.plot_ppi_map() #1400

joshua-hampton opened this issue Mar 16, 2023 · 3 comments · Fixed by #1401

Comments

@joshua-hampton
Copy link
Contributor

The colorbar_orient option that is available in pyart.graph.RadarDisplay.plot_ppi() is not available in pyart.graph.RadarMapDisplay.plot_ppi_map() (or pyart.graph.RadarMapDisplayBasemap.plot_ppi_map()). Is this intentional or just an oversight? If the latter, I have a fork that I'm happy to submit a PR from with this option added in.

@zssherman
Copy link
Collaborator

@joshua-hampton Hello! I'm honestly not too sure. It could have been an oversight. If your willing to do a PR that would be awesome! I would check to see if the plots look reasonable. My only theory if it wasn't included for a reason would be it not playing well cartopy geoaxes, but honestly not sure. So I would say its probably fine to go ahead with a PR if the behavior seems to be reasonable.

@joshua-hampton
Copy link
Contributor Author

@zssherman Thanks, I'll put in that PR. Here's a quick plot from our X-band, as far as I can see there's nothing odd going on (with the colour bar at least).

import pyart
import cartopy.crs as ccrs
import matplotlib.pyplot as plt

radar_file = 'ncas-mobile-x-band-radar-1_chilbolton_20170517-113106_SUR_v1.nc'
radar = pyart.io.read(radar_file)
display = pyart.graph.RadarMapDisplay(radar)
fig = plt.figure(figsize = (10,8))
ax = plt.subplot(111, projection=ccrs.PlateCarree())
display.plot_ppi_map('dBZ', ax=ax, colorbar_orient='horizontal', resolution = '10m')
gl = ax.gridlines(crs=ccrs.PlateCarree(),
                  draw_labels=True,
                  linewidth=1, 
                  color='gray', 
                  alpha=0.3,
                  linestyle='--')
gl.top_labels = False
gl.right_labels = False
plt.show()

nxpol1_horizontal_colorbar

@zssherman
Copy link
Collaborator

@joshua-hampton That looks reasonable to me! And sounds good thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants