[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[python #VDK-692228]: Question on an old MetPy Monday (#6)



Hello, and thanks for reaching out!

You've bumped up against an important Python concept here! :) I'm not sure if 
this was intentional, but in your provided code you specified your extents as a 
"set" (docs: 
https://docs.python.org/3.10/library/stdtypes.html#set-types-set-frozenset) 
using the curly braces instead of parens or square brackets. In Python, a set 
is an unordered collection of data. Under the hood, Cartopy needs to know the 
specific order of your boundaries in `set_extent`, and so you need to specify 
them as a list (square brackets) or tuple (parentheses) for it to appropriately 
"unpack" your extents. If I change this syntax, your code runs fine on my 
machine! Hope this helps, and don't hesitate to follow up if needed. Thanks!


All the best,

Drew


> I was reviewing an old MetPy Monday #6 and noticed a strange issue.
> Everything works fine until I get to the domain for Colorado.  By changing
> the set_extent option I get a totally different display than what John
> Leeman showed (see attached).  My Jupyter notebook is attached as well.  I
> tried different lat/lon options but nothing worked.  Any suggestions?
> 


Ticket Details
===================
Ticket ID: VDK-692228
Department: Support Python
Priority: Low
Status: Open
===================
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.