Unable to create fully transparent map in pyart #1404
-
Hello, I am trying to create a fully transparent map in pyart, however, none of the commands work to hide the image border, the division between states and the coastal division that is automatically plotted by pyart, as indicated by the red arrows on the map. I'm attaching the code and hdf file of the radar I'm using. Is there any solution for this problem? https://drive.google.com/file/d/1q_IKudDwaE4K8C5EW2gbFjRyerEMrrsu/view?usp=share_link import pyart filename = '9787SAN-PPIVol-20230320-125134-5480.hdf' lat1 = radar.latitude['data'][0] + 2.175 dc = pyart.graph.RadarMapDisplay(radar) fig = plt.figure(figsize=(12,8)) ax.set_axis_off() display = pyart.graph.RadarMapDisplay(radar) ZH_ticks = [ -30, -20, -10, 0, 10, 20, 30, 40, 50, 60, 70, 90] display.plot_ppi_map('reflectivity_horizontal', 0, cmap = 'pyart_HomeyerRainbow', ticks = ZH_ticks, min_lon = lon1, max_lon = lon2, min_lat = lat2, max_lat = lat1, plt.savefig('image.png', bbox_inches = 'tight', dpi=300, transparent=True) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @gabrielcassol , You can remove the lines by not specifying a resolution, setting embellish to false for the plot_ppi function, and adding plt.box(False). Here is an update for your code:
|
Beta Was this translation helpful? Give feedback.
Hi @gabrielcassol ,
You can remove the lines by not specifying a resolution, setting embellish to false for the plot_ppi function, and adding plt.box(False). Here is an update for your code: