EOmaps v5.4
A minor release with some awesome new features!
🌦️ changes
- ❗
m.plot_map(pick_distance=...)
is depreciated, usem.cb.pick.set_props(search_radius=...)
instead ❗
🌳 New
🌲 Improvements for PICK callbacks
The internals for pick-callbacks have been re-worked to improve performance and incorporate some new features.
- you can now use
m.cb.pick.set_props(...)
to set the picking behavior for each Maps-object
🌱 Pick N nearest neighbors
- Starting with EOmaps v5.4 it is possible to pick N nearest neighbors instead of a single point!
- Checkout the docs for more details: 🍭Picking N nearest neighbours
m = Maps() m.set_data([1,2,3,4,5], [1,2,3,4,5], [1,2,3,4,5]) m.plot_map() m.cb.pick.set_props(n=3, pick_relative_to_closest=True, consecutive_pick=False) m.cb.pick.attach.mark(fc="none", ec="r")
🌲 Improvements for shapes
🌱 There is a new plot-shape: m.set_shape.scatter_points
- basically the same as using
plt.scatter()
but supercharged so that EOmaps functionalities work as expected - use it to draw datapoints with dimensions defined in (figure-points)² (rather than actual physical dimensions)
m = Maps() m.add_feature.preset.coastline() m.set_data([1, 2, 3], [-45, 20, 52], [-10, 20, 30]) m.set_shape.scatter_points(size=[200, 50, 500], marker="*") m.plot_map(cmap="tab10")
🌱 The shape-radius can now be defined for each datapoint individually!
- The
radius
argument of the shapesellipses
,rectangles
andgeod_circles
now properly
broadcasts multiple values (e.g. you can assign an individual radius for each datapoint)m = Maps() m.add_feature.preset.coastline() m.set_data([1, 2, 3], [-45, 20, 52], [-10, 20, 30]) m.set_shape.ellipses(radius=[1, 2, 3], radius_crs=4326) m.plot_map()
🔨 fixes
- fix parsing
n=None
as shape-argument in the companion-widget - allow using the companion-widget with matplotlibs
"QtAgg"
backend - fix performance issues with
m.get_crs
- fix using
m.BM.blit_artist
if the renderer is not yet cached - make evaluation of scalebar background patch size more robust
- ensure that scalebar is correctly updated if properties change
- switch to mambaforge to avoid installation-issues in github-actions
- lazily initialize pick-search tree only if a pick callback is attached
(provides a nice speedup for large datasets if no pick callbacks are assigned) - allow passing None to
m._decode_values
- fix picking GeoDataFrames if no value-column was assigned (e.g. when using
m.add_gdf(column=None)
) - remove obsolete dependencies and unused requirements.txt from the docs