Releases: raphaelquast/EOmaps
EOmaps v7.0
A new major release that brings a lot of important updates for EOmaps!
- Export figures as vektor graphics (and export to clipboard with ctrl+c)
- Extensive re-work of the companion-widget (new design and new features)
- Basic command line interface
- Improved documentation (incl. a Contribution Guide and an API Reference)
- Improved Jupyter Notebook support
- Editable annotations
- Logging
Interested in contributing to EOmaps? Checkout the new Contribution Guide on how to get started!
🌳 New
🗺 Export figures as vector graphics
Export routines have been re-worked! Now its possible to export figures as vector graphics (svg, pdf, eps) in addition to rasterized images (png, jpeg, tiff, ...)!
- use
m.savefig(rasterize_data=False)
to control if datasets are exported as vectors or not- by default datasets are rasterized even on vector export to avoid creating very large files
Checkout the corresponding section in the docs for more details.
📦 Directly export figures to the clipboard (ctrl + c
)!
This is really useful to quickly copy-paste the current state of a figure at runtime to other programs (e.g. paste figures in documents or in an image-editing software for post-processing)
The export can be customized (file-type, dpi, etc.)
- simply adjust the most important parameters in the Companion Widget
(currently set values are used for clipboard export) - or use
m.set_clipboard_kwargs(...)
to programmatically set clipboard-export parameters
🧰 Companion Widget updates
The companion widget has been extensively re-worked:
- New design with a nice and clean look and greatly improved usability
- New features:
- Human readable names for artists in the editor
- Assign transparencies to individual layers
- Currently set export parameters are now used as parameters for export to clipboard
(e.g. wheneverctrl + c
is pressed) - set arrow/patch/text/colors for annotations (and a button to make existing annotations editable)
Checkout the corresponding section in the docs for more details.
🔍 Zoomable InsetMaps
InsetMaps can now be zoomed (and indicator patches are updated accordingly)
Editable Annotations
The AnnotationEditor
allows you to interactively place (or edit existing) annotations!
- Set text, colors, patch and arrow designs
- Drag textbox and anchor position
✑ Command Line Interface
EOmaps can now be used directly from the terminal via the eomaps
command!
The following options can be provided:
--help
get some help--crs <crs identifier>
set the crs of the map--location <location>
set the map extent to the queried location`--file <path>
open a file for plotting--ne <feature name>
add basic features to the map--wms <wms name>
add some selected WebMaps to the map
For example: `eomaps --crs 4326 --ne coastline --ne ocean --location europe
Checkout the corresponding section in the docs for more details.
Updates for Jupyter Notebooks
It is now possible to use the companion widget in jupyter notebooks!
To support using the widget, use the ipympl backend together with the %gui qt
command!
%matplotlib widget
%gui qt
from eomaps import Maps
m = Maps()
m.add_feature.preset("coastline", "ocean")
Logging
Proper logging
has finally been implemented!
To set the log-level (and customize log message formatting), use:
from eomaps import Maps, set_loglevel
set_loglevel("info")
m = Maps(3857)
m.set_data([1, 2, 3], [1, 2, 3], [1, 2, 3], crs=4326)
m.plot_map()
📖 Documentation updates
The documentation has been extensively updated to make it cleaner and easier to navigate.
- Improved document structure and proper cross-referencing throughout the docs
- Many updates on individual chapters
- New chapter 🚀 Contribution Guide
additional new features worth mentioning:
- There is a new way to add multiple preset features to a map in one go:
m = Maps() m.add_feature.preset("coastline", "ocean", "land")
- New (shorter) syntax for delayed actions that initialize a new layer:
def func(m): m.add_feature.preset.coastline() m = Maps() m.on_layer_activation(func, layer="my_layer")
- It is now possible to select if callbacks are executed on all layers or only on the visible layer (see
m.cb.<method>.set_execute_on_all_layers()
) - There is a new convenience method
m.add_title(...)
to add a title to a map - The new class-method
Maps.config(...)
can be used to set global config variables
(backend specific configs, default shortcuts etc.)
⚠️ Depreciations
m.set_data_specs(...)
is deprecated and will be removed in the next minor version. Usem.set_data(...)
instead!m_inset.indicate_inset_extent
is deprecated, Usem_inset.add_extent_indicator
instead!
A lot of code re-factoring has been done to better follow PEP8 naming conventions.
Most of the changes concern internal class and function definitions and should not affect public API.For more details see From EOmaps v6.x to v7.x:
🔨 Fixes
- properly cross-reference functions in docs
- fix companion-widget init for maps in already initialized figures
- better caching for transformers and crs objects
- unify handling of default PyQt5 keypress callbacks
- avoid recursions caused by dynamically updated grids on savefig
- fix performance issue with
m.get_extent
- fix colorbar causing singular matrix errors with hist_size=1
- only warn for vmin/vmax=None if data is not inherited
- fix clearing peek-layer callback markers on savefig
- make sure "all" layer callbacks are executed after normal layers
- fix performance issues with the LayoutEditor
- allow activating the LayoutEditor if toolbar actions are active
- fix InsetMaps._parent override on init
- fix clearing temp artists on Maps-cleanup
- fix search radius crs when using geod_circles
- fix dataset-Maps object identification for semi-transparent layers
- fix treatment of figure background patches
- fix issues with jupyter notebook
inline
backend - fix issues with LayoutEditor and jupyter notebook
ipympl
backend - avoid using black dots in the LayoutEditor to support dark themes
- fix cleanup of data_manager callbacks on consecutive calls to plot_map
- fix activating current layer on control+click on tab-widget
- cache combined layers only if necessary
- avoid unnecessary draws in shape-drawer
- avoid duplicated snapshots on update with inline backend
- fix using the companion widgets with backends other than PyQt5
- fix shade canvas size updates on figure resize events
EOmaps v6.5
A new release that finally adds a long-standing feature request to EOmaps: GridLabels!
🌳 new
🌐 Grid Labels
It is now possible to add labels to grids in arbitrary projections!
Make sure to checkout the new section in the docs Adding Labels to the Grid as well as the new 🌐 Gridlines and Grid Labels example!
m = Maps(...)
...
g = m.add_gridlines(...)
g.add_labels(...)
🔬 New features for InsetMaps
m_inset.add_indicator_line(...)
: Add a line that connects the inset-map with the inset-extent on another map.- The edge-color of the inset-map can now be specified directly via the
boundary
kwarg (e.g.boundary="red"
)
...other new features
- Picked compass objects are now indicated with a red boundary
- ColorBar objects have a new convenience-method
cb.set_labels(...)
to set the colorbar & histogram labels (and the style) - the 📖 Documentation has been re-structured and updated
🌦️ changes
- Fill values in integer encoded datasets are now excluded when evaluating data-bounds (vmin/vmax)
m.from_file
,m.read_file
andm.new_layer_from_file
now support the additional kwargfill_values="mask"/"keep"
(to avoid costly and memory-intensive initialization of masked-arrays for extremely large datasets)- the
print_to_console
callback now returns tuples by default
🔨 fixes
- fix cartopy crs identification from pyproj-crs
- fix updating compass objects on init and scroll events
- fix colorbars should only inherit positions if orientation is the same
- fix colorbar minor ticks for vertical colorbars
- fix clipping of colorbar bins provided as lists
- make sure NE preset features handle mpl-synonyms (ec, fc, lw ...)
- fix orientation of inset-map boundary vertices
EOmaps v6.4.1
A minor bugfix release to ensure immediate draws of new background artists
🔨 fixes
- fix setting vmin/vmax for encoded data
- fix add/remove bg_artists should immediately trigger a draw
EOmaps v6.4
A minor release that brings some nice performance improvements and a lot of bugfixes.
📏 Improvements for the scalebar!
The ScaleBar implementation has been re-worked in terms of performance and usability.
- For details, check the section in the docs! 📏 Scalebars
🔨 Fixes
- fix adding colorbars with
hist_size=None
- fix treatment of inset-maps in peek-layer callbacks
- improve scalebar performance
- make sure scalebars are not positioned out of bounds
- cache transformer and crs objects to speed up initialization
- make sure spines are properly updated on refetch-bg actions
- make Maps-axes animated to avoid unnecessary draws of AxesImage objects
- speed up initialization of Maps objects
- fix performance issues with the companion-widget with many map-layers
- fix updating dynamic colorbars on layer change
- only print a warning on pick-dataset override if pick-callbacks are assigned
- fix inheriting classifications from maps using shade-shapes
- properly support
layer
kwarg form.text
- make sure dynamic artists maintain plot order at same zorder
- fix inset-map indicator shapes should be permanent artists
- fix using uniform colors for delaunay_triangulations
- fix identification of intermediate shape-points if data=None
- unify treatment of vmin/vmax for all shapes
- fix issues with inherited classifications and vmin/vmax
⚠️ Depreciations
- The ScaleBar segment-length (
scale
) and number of segments (n
) are now explicitly passed as arguments on initialization:m.add_scalebar(scale=..., n=...)
(Old syntax is still functional but will raise an error in future versions!)
EOmaps v6.3
A new minor release with a lot of important fixes.
🌦️ changes
- Dynamic artists now properly respect the order of multi-layers
- Vertical stacking of artists is determined first by the layer-order and then by the intrinsic zorders within the layer
- Executing callbacks now clears temporary artists only for the currently visible layer
- The obsolete method
m.util.remove(...)
has been removed.- call
.remove()
on the selector/slider instances directly to remove them!
- call
🌳 New
m.util.layer_slider()
andm.util.layer_selector()
now support using "combined layer tuples" when specifying layer-names that should be included in the widget (e.g.layers=["layer1", ("layer1", "layer2")]
)m.get_extent()
: get the extent of the map (a wrapper form.ax.get_extent()
)
🔨 Fixes
- ❗ Fix maintaining order of vertical stacking for background artists at the same zorder
- ❗ Fix vertical stacking order of dynamic artists on multi-layers
- ❗ Fix issues using
m.set_shape.raster()
with irregularly spaced datasets - ❗ Fix automatic evaluation of intermediate points used for plot-shapes based on visible data size
- Fix issues with background patches for dynamic artists on ordinary (managed) axes
- Use unittests to check basic functionality of code-snippets in docs
- Mention
m.set_extent()
in the docs - Update
docutils
,sphinx
andsphinx_rtd_theme
versions - Only attempt to close netcdfs in
m.read_file.NetCDF
if opening was successful - Fix triggering data_manager updates for dynamic collections
EOmaps v6.2.1
Primarily a bugfix release that also introduces new WebMap services!
🌳 New
- There is a new option to directly export figures with a "tight bbox" in the companion-widget.
🗺️ new WebMap services
- OpenStreetMap
- Humanitarian (e.g. HOT) style (https://wiki.openstreetmap.org/wiki/HOT_style)
- OpenSeaMap (https://wiki.openstreetmap.org/wiki/OpenSeaMap)
- GMRT (Global Multi-Resolution Topography (GMRT) Synthesis, https://gmrt.org/)
- GLAD (Global Land Analysis and Discovery Team, https://glad.umd.edu/)
- GOOGLE (Google Maps layers, https://google.com)
🌑 EOmaps is going outta space!
(❗ NOTE: since these WebMaps are provided in an earth-based WebMercator projection, units of scalebars, geod-circles etc. will be wrong since they represent earth-based units)
- OpenPlanets - Mars and Moon WebMaps! (https://www.openplanetary.org)
🌦️ Changes
ESRI_ArcGIS
WebMap services are now fetched asxyz
services
🔨 Fixes
- fix exporting figures with tight bboxes if
dpi=figure_dpi
- fix data-manager issues if radius cannot be evaluated
- fix using custom globes with scalebars and gridlines
- make sure webmaps are added transparent in the companion-widget
- fix identification of picked values if
"shade_raster"
is used with 2D coordinates
EOmaps v6.2
A minor release that brings new WebMap services and addresses handling of non-EOmaps artists.
🌳 New
Improved handling of artists added with matplotlib/cartopy methods
Handling of artists added with methods NOT provided by EOmaps
(e.g. using matplotlib
or cartopy
methods directly) has been improved:
- All artists that are created with non-
EOmaps
methods are now drawn on the "base" layer by default. - To put artists on dedicated layers, you need to explicitly add them to the blit-manager (
m.BM
):- for "dynamic" artists that have to be updated on every event on the map:
m.BM.add_artist(artist, layer=...)
- for "background" artists that only need to be re-drawn on pan/zoom/resize:
m.BM.add_bg_artist(artist, layer=...)
- for "dynamic" artists that have to be updated on every event on the map:
from eomaps import Maps
m = Maps(layer="base")
m.add_feature.preset.coastline() # EOmaps method... the layer of `m` is used for the artist
# a matplotlib method is used... this artist will show up on the "base" layer
m.ax.plot([10, 20, 30], [5, 78, 25], c="r", lw=3)
# to put arbitrary artists on dedicated layers, add them to the blit-manager:
l, = m.ax.plot([10, 20, 30], [5, 78, 25], lw=2, c="b")
m.BM.add_bg_artist(l, layer="my_line")
🗺 New OpenStreetMap WebMap services added!
- OpenRiverboatMap
- CyclOSM
- OEPNV_public_transport
- OSM_WhereGroup
- OSM_WaymarkedTrails
- OSM_OpenRailwayMap
- OSM_CartoDB basemaps
🔨 Fixes
- fix drawing artists that were not added via EOmaps functions (e.g. using matplotlib/cartopy functionalitites)
- fix using
m.savefig()
withbbox_inches="tight"
EOmaps v6.1.3
A quick-fix release to fix adding multiple markers via lists of data IDs
🔨 Fixes
- fix adding multiple markers/annotations by ID
EOmaps v6.1.2
A second bugfix release for v6.1
🌳 New
InsetMaps
now add a white background patch by default.
(usem.new_inset_map(background_color=None)
to get a transparent inset-map
🔨 Fixes
- fix
crs
argument ofm.set_extent()
- fix re-population of layer-tabs in the widget if new layers are created with the widget
- fix assignment of initial shape "n" on new layer creation
- fix treatment of the "all" layer on
InsetMaps
- fix issues with flushing events on fast updates in the companion widget
- fix
GridLines
should inherit the default layer from the calling maps object - fix treatment of background patches for "unmanaged" axes
- fix removing background-artists from dedicated inset-map layers
EOmaps v6.1.1
A quick bugfix release that addresses some issues in Jupyter Notebooks
🔨 fixes
- fix creating snapshots (e.g. for jupyter notebooks etc.) with arbitrary combinations of layers
- fix spines not properly updated when adding colorbars with
%matplotlib inline
EOmaps v6.1
A minor release that fixes remaining issues with v6.0.x and adds functionalities for grid-lines!
🌳 New
- The
LayoutEditor
now supports undo/redo of recent events viacontrol + z
andcontrol + y
- There is a new method
m.new_map()
to simplify adding new maps to existing figures InsetMaps
now have a new methodm.get_inset_position()
to get the current position and size- There is a new function
m.add_gridlines()
that can be used to addGridLines
to the map!- Have a look at the new section in the docs for more details: ▦ Gridlines
🔨 Fixes
- fix
ReferenceErrors
if the parent-map variable is overridden while the figure is still open - fix performance issues caused by unnecessary updates in the companion widget
- avoid triggering "on_layer_change" actions if the layer is already active
- make sure the selected "pick-map" does not automatically reset in the companion-widget
- only attempt to close an opened file if opening was actually successful
- add support for the "frameon" kwarg when creating new Maps-objects
- fix "pick-only" datasets should not attempt to plot a collection
- fix misplaced axes-frames when adding colorbars on already opened plots
- fix re-positioning of already created
InsetMaps
- fix handling of matplotlib-inline backends
- raise an error if geod_circles are used without providing a radius
- fix altering colorbar/histogram scaling with + and - keys
- fix issues when trying to fetch wms submenus for non-accessible servers