ResidentMario/geoplot: 0.4.0 release
Description
This release is a major breaking refactor of the colormap parameters in geoplot
.
Changes to the scheme
parameter and the removal of k
parameter
In previous versions of geoplot
, categorical colormaps were specified by a combination of the scheme
and k
string parameters. For example:
import geoplot as gplt
df = gpd.read_file(gplt.datasets.get_path('usa_cities'))
gplt.pointplot(df, hue='ELEV_IN_FT', cmap='viridis', scheme='EqualInterval', k=5)
In versions of geoplot
0.4.0 and later, the code to do this is now:
gplt.pointplot(df, hue='ELEV_IN_FT', cmap='viridis', scheme='EqualInterval')
Or this:
import mapclassify as mc
scheme = mc.EqualInterval(df['ELEV_IN_FT'], k=5)
gplt.pointplot(df, hue='ELEV_IN_FT', cmap='viridis', scheme=scheme)
This changeset was implemented primarily to make it possible to share the same colormap across plots. This was previously very difficult to do: see #163 and #182 for further context.
Other changes
This update also includes a number of minor bugfixes and docs changes.
Files
ResidentMario/geoplot-0.4.0.zip
Files
(10.6 MB)
Name | Size | Download all |
---|---|---|
md5:5d4da79b56699ac01d61f6f86353925a
|
10.6 MB | Preview Download |
Additional details
Related works
- Is supplement to
- https://github.com/ResidentMario/geoplot/tree/0.4.0 (URL)