You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Append +l|+L to =continent to only list countries in that continent; repeat if more than one continent is requested.
I tried this, but so far I am not sure how it should work. I only get an output when running the python script or code directly in a terminal. When using an IDE (e.g., Spyder, JupyterLab) there is no output neither in the console nor in the terminal.
Further, this part of the docstring is not precise, as +l gives the codes for the countries, but +L gives the codes for the states/territories.
Here are some quick ideas about my expected functionality for the dcw data.
>>>frompygmtimportdcw>>>dcw.path/path/to/gmt/share/dcw# path to the dcw directory>>>dcw.version2.1.2>>>north_america=dcw(continent="NA") # A DCW_Continent object>>>print(north_america) # print something about the North America continentnorth_america.code="=NA"# GMT's internal codenorth_america.countries= ["AO", "BF", ...] # list of country codes# Or maybe it should be dict of DCW_Country object, then we can have the following syntax:>>>north_america["US"] # A DCW_Country object>>>north_america.to_file("na.txt") # save data to a file>>>gdf=north_america.to_geopandas() # save data into a geopandas object>>>north_america.region# region: [xmin, xmax, ymin, ymax]# Here is another way to have a DCW_Country object>>>usa=dcw(country="US") # returns a DCW_Country object>>>usa.code"US">>>usa.to_file("usa.txt")
>>>gdf=usa.to_geopandas()
>>>usa.region
[xxx, xxx, xxx, xxx]
>>>usa.states# List of DCW_State object
["CI", "MI", ...]
>>>usa["CI"] # A DCW_State object# Here is another way to have a DCW_State object>>>california=dcw(country="US", state="CI")
>>>california.code"US.CI">>>california.to_file("ci.txt")
>>>california.to_geopandas()
>>>california.region
[xxx, xxxx, xxx, xxx]
Description of the problem
First mentioned in #2428 (comment).
In the docstring for the
dcw
parameter ofpygmt.Figure.coast
we say:I tried this, but so far I am not sure how it should work. I only get an output when running the python script or code directly in a terminal. When using an IDE (e.g., Spyder, JupyterLab) there is no output neither in the console nor in the terminal.
Further, this part of the docstring is not precise, as +l gives the codes for the countries, but +L gives the codes for the states/territories.
Minimal Complete Verifiable Example
Full error message
System information
The text was updated successfully, but these errors were encountered: