Eomaps

Latest version: v8.3.2

Safety actively analyzes 707009 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 10 of 15

4.0

A new major release that brings some nice new features, a lot of updates and some outstanding api-changes.
🌩 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](
https://eomaps.readthedocs.io/en/dev/FAQ.html#port-script-from-eomaps-v3-x-to-v4-x)

[or click on the text below for details!]

<details>
<summary>πŸ”Έ <code>m.plot_specs</code> and <code>m.set_plot_specs(...)</code> have been removed</summary>

- **"vmin", "vmax"** and **"cmap"** are now set when calling `m.plot_map(...)`
- **"density", "tick_precision", "histbins"** and **"label"** are now set when calling `m.add_colorbar(...)`
- **"cpos"** and **"cpos_radius"** are now set with `m.set_data_specs(...)`

</details>

<details>
<summary>πŸ”Έ <code>voroni_diagram</code> is now correctly called <code>voronoi_diagram</code></summary>

This just fixes the typo in the name.

python
--- OLD ---
m.set_shape.voroni_diagram()

--- NEW ---
m.set_shape.voronoi_diagram()



</details>

<details>
<summary>πŸ”Έ The data-specs <code>xcoord</code> and <code>ycoord</code> have been renamed to <code>x</code> and <code>y</code></summary>

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` and `y` variable names.

python
--- OLD ---
m.set_data(data=..., xcoord=..., ycoord=..., ...)
m.data_specs.xcoord

--- NEW ---
m.set_data(data=..., x=..., y=..., ...)
m.data_specs.x


</details>

<details>
<summary>πŸ”Έ Custom callback functions now have a slightly different call-signature </summary>

> This removes the contra-intuitive "binding" of functions to the `Maps`-objects and ensures that class-methods can be used as callbacks without unwanted side-effects.

- The first argument is no longer identified automatically as the `Maps`-object!
(if you need access to the underlying `Maps`-object, simply pass it as an argument!)

python
m = Maps()
def cb(m, **kwargs):
pos = kwargs["pos"]
print("the Maps-object:", m)
print("the click-position is", pos)

m.cb.click.attach(cb, m=m)


<details>
<summary> πŸ‘Ύ [click to show] how to get back the old behaviour </summary>

To get back the old behavior you have to "bind" the callback functions to the Maps-object, e.g:

python
m = Maps()
def cb(self, **kwargs):
...

m.cb.click.attach(cb.__get__(m))

or simply pass the Maps-object as kwarg, e.g.:
python
m = Maps()
def cb(self, **kwargs):
...

m.cb.click.attach(cb self=m)


</details>

</details>

🌳 NEW
- ⭐ The Sentinel-2 cloudless WebMap service can now be used via `m.add_wms.s2_cloudless`
- 🌟 It is now possible to set "coordinate-only" datasets!
- This is particularly useful if you want to manually assign colors
python
m.set_data(None, [1,2,3], [1,2,3])
m.plot_map(fc=["r", "g", "b"])

πŸš€ there's a new plot shape! `m.set_shape.raster`
A fast way to plot 2D datasets.
<details>
<summary>[click to show] πŸ”Έ details </summary>

- it's quite similar to `plt.imshow` (e.g. a QuadMesh is used to speed up plotting of 2D datasets)
- the differences to `shade_raster` are:
- the whole dataset is always plotted (so for very very large datasets `shade_raster` is much faster!)
- it supports manual color specifications (`shade_raster` does not)
- the differences between `rectangles` and `raster` are:
- `raster` does not take the curvature of the edges into account
- `raster` determines the pixel-size based on neighboring pixels, `rectangles` allows arbitrary pixel-dimensions

</details>

🌈 there have been some major improvements for manual color specifications!

Checkout the [🌎 Customizing the plot](https://eomaps.readthedocs.io/en/dev/api.html#customizing-the-plot) section of the docs for details!

Colors can now be set manually with all shapes (except `shade` shapes) using
`m.plot_map(fc=[...])` (or `facecolor=` or `color=`)!


<details>
<summary>[click to show] πŸ”Έ Possible ways to specify colors.</summary>

- a single value (RGB/RGBA tuple, a matplotlib color-name or a hex-color)
- a tuple of 3/4 arrays in the same shape as the coordinates (identified as RGB/RGBA values)
- a list/array of RGB tuples, e.g. `[(1, 0, 0.25), (0.3, 0.4, 0.5), ....]`
- a list/array of RGBA tuples, e.g.: `[(1, 0, 0.25, 0.15), (0.3, 0.4, 0.5, 0.25), ....]`
- a list/array of matplotlib named-colors, e.g. `["r", "olive", "darkblue", ...]`
- a list/array of hex-colors, e.g.: `['ff0040', '4c6680', ...]`
For example:
python
m = Maps()
m.set_data(None, [1,2,3,4,5], [1,2,3,4,5])
use named colors
m.plot_map(ec="k", fc=["r", "olive", "darkblue", "orange", "indigo"])
or RGB tuples
m.plot_map(color=[(1, 0, 0), (.4, .5, .6), (.2, .7, .2), (.45, .12, .98), (.94, .45, .56)])
or a single color for all datapoints
m.plot_map(facecolor="g", edgecolor="r")
or use 3 individual arrays that should be identified as RGB values

3.5

πŸš€ updates
⭐ EOmaps now properly handles encoded datasets!
- This saves a lot of memory and provides a huge speedup when plotting integer-encoded datasets!
- If you plot GeoTIFFs or NetCDFs with the functions `Maps.read_data`, `Maps.from_file` or `m.new_layer_from_file`, the data is now kept in the encoded dtype and conversions are only performed "on demand" (e.g. when adding colorbars or in pick-callbacks)
- (if you really want to immediately convert all data-values, use `mask_and_scale=True` )
- The encoding information can be get/set via `m.data_specs.encoding` or `m.set_data_specs(encoding=...)`

python
m = Maps()
m.set_data(data=[1,2,3], xcoord=[1,2,3], ycoord=[1,2,3], encoding=dict(scale_factor=0.01, add_offset=1))
the "decoding" of the values is evaluated via "add_offset" + "scale_factor" * x

3.4.1

- fix issues with delayed WebMap services on multiple maps in one figure
- fix issues with `m.all` for multiple maps in one figure

3.4

A release that brings a lot of updates on speed and memory management and some very nice (but possibly breaking) changes compared previous versions of EOmaps.

❗ IMPORTANT CHANGES ❗

⭐ Starting with EOmaps v3.4 all callbacks and colorbars are layer-specific !
This means that callbacks only trigger if the layer of the associated `Maps` object is visible!
(...and colorbars are only visible if the associated layer is visible)

- To trigger callbacks or add features & datasets independent of the visible layer, use `m.all.cb. ...`
(or attach them to a `Maps` object on the `"all"` layer)
- **Note:** `pick` callbacks now always react to the visible collection!
(except for the ones on the `"all"` layer)

python
m = Maps(layer=0)
m.cb.click.attach.annotate() this callback is ONLY executed if the layer 0 is visible

m1 = m.new_layer(layer=1)
m1.cb.click.attach.mark() this callback is ONLY executed if the layer 1 is visible

m.all.cb.click.attach.annotate() this callback is executed independent of the visible layer!


πŸƒ removed arguments
- the obsolete `"orientation"` argument has been removed from `Maps(...)`
(it set the colorbar-orientation which is now specified via `m.add_colorbar(orientation=...)`
---

🌳 NEW
- ⭐ `m.show()` can be used to make the associated layer visible. (a shortcut for `m.show_layer(m.layer)`
- ⭐ `m.BM.on_layer(...)` can be used to trigger functions if the visible layer changes.
- 🌟 WebMap layers are now lazily evaluated and only added to the map if the corresponding layer is actually visible.
- 🌟 [experimental feature] memory-mapping can now be used to avoid using up a lot of ram for very large datasets
- Intermediate datasets are stored as memory-mapped files in a temp-folder on disk to release memory
- By default memory-mapping is disabled! (to activate it, use: `m.plot_map(memmap=False)` )

🌦️ changes
- Adding data from files (e.g. `m.from_file` or `m.new_layer_from_file`) now **always** uses `"shade_raster"` as the default plot-shape (since EOmaps v3.3.2, raster-shading works perfectly fine with re-projected rasters as well)
- If a file with >2M data-points is plotted, only "shade" shapes are attempted by default to avoid overloading memory.
- only one colorbar is allowed for ``Maps`` objects (use multiple objects for multiple colorbars)

πŸ”¨ fixes
- Fix several issues with memory-leaks and garbage-collection of objects
- Fix autoscale_fraction not recognized when using `preset="bw"` in `m.add_scalebar`
- Maps objects are now properly garbage-collected
- Fix auto-scaling of scalebars for very small scales
- `Maps.from_file` now properly handles `pathlib.Path` objects
- Fix utility widget start-layer should be the currently visible layer
- Fix pick-events should only identify points on visible layers
- Fix `m.add_colorbar(log=True)` for horizontal colorbars
- Fix colorbar limit autoscaling
- Fix logo size changes on zoom
- Remove obsolete `layer` kwarg from `m.add_logo`
- Fix incorrect color-normalization for `shade_raster` or `shade_points` if `vmin/vmax` outside the data-range are used
(thanks to maxhollmann)

3.3.2

A minor bugfix release that brings some nice updates for raster-shading!

🌳 NEW
- ⭐ Raster-shading with `m.set_shape.shade_raster()` can now finally be used with re-projected datasets as well!
- The previous limitation `plot_crs == data_crs` is now gone for good πŸ₯³

πŸ”¨ fixes
- fix issues for `m.util.layer_slider` when switching between xyz-WebMap layers if axis-extent changed
- fix glitches of dynamic artists during pan/zoom
- fix image parsing in github-pages jekyll parser

3.3.1

A minor bugfix release (that also brings some miscellaneous convenience functions)

🌳 NEW
(⭐: new feature, πŸƒ: new functionality for existing feature)
- ⭐ there's a new function `m.subplots_adjust()` for `Maps` and `MapsGrid` objects to quickly set the margins of the plots as well as the horizontal and vertical spacing between subplots:
python
m = Maps()
m.subplots_adjust(left=0.2, right=0.8, top=0.9, bottom=0.1)

python
mg = MapsGrid()
mg.subplots_adjust(left=0.2, right=0.8, top=0.9, bottom=0.1, hspace=0.05, wspace=0.15)

(these are just shortcuts for `m.figure.gridspec.update()` + `m.redraw()`)
- πŸƒ `m.add_colorbar` now has an additional kwarg `log=True/False` to make the y-axis of the histogram logarithmic.
- πŸƒ `m.add_scalebar` now provides style-presets via `preset="<preset-name>"`
- at the moment there's only 1 preset... more to come in future releases!
- `"bw"`: a simple black-and-white style without a background

πŸ”¨ fixes
- fix `m.savefig` with different dpi-settings requres a re-draw
- fix `m.plot_map` with `dynamic=True` does not require a update
- incorporated some updates to ensure that layers are only re-drawn if necessary
- make sure cached backgrounds are always re-drawn if new artists are added
- fix annotation in example 9 (still used old syntax)

Page 10 of 15

Β© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.