This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Greetings!
I think changing your call to pcolor to:
plot = ax.pcolor(lat, lon, data, cmap=cmap, norm=norm, zorder = 0,
transform=ccrs.PlateCarree())
In your original code, with CartoPy when you don't pass `transform`, it assumes
the x/y values you pass in (the `lat` and `lon` arrays in this case) are in the
same coordinates as your Axes, which in this case is a Lambert Conformal
projection. To tell it they represent coordinates in a lat/lon projection, you
need to pass `transform=ccrs.PlateCarree()`, as I've done above.
Hope this helps!
Ryan
> Hi Ryan,
> Thanks for the tips. OK, I've made some progress, but I think I'm missing
> something still.
>
> the FSX-demo5.py script :
> http://www.met.sjsu.edu/weather/radartest/FSX-demo5.py
>
> produces this, with correct radar data and orientation:
> http://www.met.sjsu.edu/weather/radartest/demo-5.png
>
> But when I uncomment the set_extent line, I can get the counties to plot,
> but not the actual data.
> http://www.met.sjsu.edu/weather/radartest/FSX-demo6.py
>
> http://www.met.sjsu.edu/weather/radartest/demo-6.png
>
> <http://www.met.sjsu.edu/weather/radartest/demo-6.png>
Ticket Details
===================
Ticket ID: UMK-725743
Department: Support Python
Priority: Low
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata
inquiry tracking system and then made publicly available through the web. If
you do not want to have your interactions made available in this way, you must
let us know in each email you send to us.