Skip to content

EOmaps v4.3

Compare
Choose a tag to compare
@raphaelquast raphaelquast released this 05 Jul 18:16
· 2263 commits to master since this release
ef52cc6

A new release that brings some nice updates and an awesome new Layout-Editor!

🌦️ Changes

  • πŸƒ utility-widgets now auto-update themselves if new layers are added to the map!
    • to show only a subset of the available layers, use m.util.layer_selector(layers=["layer1", ...])
  • πŸƒ coastlines are no longer added by default when creating new layers from files (e.g. NetCDF, GeoTIFF etc.)
    • (use coastlines=True or explicitly call m.add_feature.preset.coastline() to add coastlines!)
  • πŸƒ m.add_gdf now allows using a path to a file that can be read with geopandas.read_file instead of providing the geopandas.GeoDataFrame directly
  • ❗ keyword-arguments for m.new_inset_map have changed!
    • edgecolor and linewidth are depreciated and will be removed in next major versions!
    • to set the properties of the boundary-polygon, use m.new_inset_map(boundary=dict(fc="r", lw=1) instead
  • ❗ m.cb.dynamic has been removed

🌳 New

⭐ New accessor for classification schemes

The new classification-schemes accessor 🌟 m.set_classify provides autocompletion and proper docstrings!
(you can use it just as you would use m.set_classify_specs)

Just select the scheme you want to use and call it with the relevant parameters:

m = Maps()
m.set_data(...)
m.set_classify.Quantiles(k=5)
m.plot_map(...)

# alternative (old) way to set the classification:   
# m.set_classify_specs(scheme="Quantiles", k=5)

⭐ There's a new πŸ—οΈ Layout Editor to quickly re-arrange the subplots of a figure!

The Layout Editor can be used to quickly re-arrange the position of all axes in the figure.
(works for maps, colorbars, inset-maps, ordinary matplotlib plots etc.)

  • You can save and re-apply a layout with:
    • 🌟m.get_layout(): get the current layout (or dump the layout as a json-file)
    • 🌟m.apply_layout(): apply a given layout (or load and apply the layout from a json-file)
    • 🌟m.edit_layout(filepath=...): enter LayoutEditor and (optionally) save layout as a json-file on exit

To quickly enter/exit Layout Editor, simply use the assigned keyboard-shortcuts:

  • press ALT + L to enter the LayoutEditor mode
  • press ALT + L again or escape to exit the LayoutEditor

Have a look at the new section in the πŸ“– documentation for more details!

πŸ”¨ Fixes

  • fix recognizing the parent layer when initializing utility-widgets from the parent Maps object
  • fix layer-selectors should indicate no active layer if the active layer is not part of the widget
  • updates for inset-maps
  • add fix for reprojection issues with certain projections
  • fix reprojection sometimes masks certain shapes