-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge for EOmaps v4.0 #71
Conversation
Codecov Report
@@ Coverage Diff @@
## master #71 +/- ##
==========================================
- Coverage 73.94% 71.67% -2.28%
==========================================
Files 12 12
Lines 5323 5669 +346
==========================================
+ Hits 3936 4063 +127
- Misses 1387 1606 +219
Continue to review full report at Codecov.
|
(so that buffer=... can be used without explicitly using radius_crs="out")
- fix NetCDF reader for 1D coordinates and 2D data
- add info on how to port from v3.x to v4.x - add "quickstart guide" - add overview diagram for selecting "the right shape"
cache initialized crs objects call plt.show() for ipympl backend (jupyter notebooks)
π¦οΈ changes
β There are breaking changes to EOmaps v3.x β
π For a quick-guide on how to port existing scripts to v4.x see: βοΈ port script from v3.x to v4.x
[or click on the text below for details!]
πΈ
m.plot_specs
andm.set_plot_specs(...)
have been removedm.plot_map(...)
m.add_colorbar(...)
m.set_data_specs(...)
πΈ
voroni_diagram
is now correctly calledvoronoi_diagram
This just fixes the typo in the name.
πΈ The data-specs
xcoord
andycoord
have been renamed tox
andy
This change is optional and will only raise a depreciation warning for now...
The old naming-convention will however be removed in future releases so it's highly recommended to use the new (shorter and more intuitiveπ)
x
andy
variable names.πΈ Custom callback functions now have a slightly different call-signature
Maps
-object!(if you need access to the underlying
Maps
-object, simply pass it as an argument!)πΎ [click to show] how to get back the old behaviour
To get back the old behavior you have to "bind" the callback functions to the Maps-object, e.g:
or simply pass the Maps-object as kwarg, e.g.:
π³ NEW
m.add_wms.s2_cloudless
π there's a new plot shape!
m.set_shape.raster
plt.imshow
(e.g. a QuadMesh is used to speed up plotting of 2D datasets)shade_raster
are:shade_raster
is much faster!)shade_raster
does not)rectangles
andraster
are:raster
does not take the curvature of the edges into accountraster
determines the pixel-size based on neighboring pixels,rectangles
allows arbitrary pixel-dimensionsπ there have been some major improvements for manual color specifications!
Checkout the π Customizing the plot section of the docs for details!
Colors can now be set manually with all shapes (except
shade
shapes) usingm.plot_map(fc=[...])
(orfacecolor=
orcolor=
)!Several ways to specify colors are supported:
[(1, 0, 0.25), (0.3, 0.4, 0.5), ....]
[(1, 0, 0.25, 0.15), (0.3, 0.4, 0.5, 0.25), ....]
["r", "olive", "darkblue", ...]
['#ff0040', '#4c6680', ...]
For example:
βοΈ minor (non-breaking) changes
radius_crs
for themark
callback is now determined based on theradius_crs
assigned in the plot-shape... this definition allows using
m.cb.pick.attach.mark(buffer=3)
directly without having to worry about the crs(previously
in
, e.g. the input-crs was used by default)None
π¨ fixes
(e.g. when providing explicit color-arrays via
m.plot_map(color=[...])
)