InsetMaps

class eomaps.inset_maps.InsetMaps(parent, crs=4326, layer=None, xy=(45, 45), xy_crs=4326, radius=5, radius_crs=None, plot_position=(0.5, 0.5), plot_size=0.5, shape='ellipses', indicate_extent=True, indicator_line=False, boundary=True, background_color='w', **kwargs)

Base class to create inset maps.

Methods

__init__(parent[, crs, layer, xy, xy_crs, ...])

add_annotation([ID, xy, xy_crs, text, update])

Add an annotation to the plot.

add_colorbar(m[, pos, inherit_position, ...])

Add a colorbar to the map.

add_compass([pos, pos_transform, scale, ...])

Add a "compass" or "north-arrow" to the map.

add_extent_indicator([m, n])

Add a polygon to a map that indicates the current extent of this inset-map.

add_gdf(gdf[, picker_name, pick_method, ...])

Plot a geopandas.GeoDataFrame on the map.

add_gridlines([d, auto_n, n, bounds, layer, ...])

Add gridlines to the map.

add_indicator_line([m])

Add a line that connects the inset-map to the inset location on a given map.

add_line(xy[, xy_crs, connect, n, del_s, ...])

Draw a line by connecting a set of anchor-points.

add_logo([filepath, position, size, pad, ...])

Add a small image (png, jpeg etc.) to the map.

add_marker([ID, xy, xy_crs, radius, ...])

Add a marker to the plot.

add_scalebar(m[, preset, scale, n, ...])

Add a scalebar to the map.

add_title(title[, x, y])

Convenience function to add a title to the map.

apply_layout(layout)

Set the positions of all axes within the current plot based on a previously defined layout.

cleanup()

Cleanup all references to the object so that it can be safely deleted.

copy([data_specs, classify_specs, shape])

Create a (deep)copy of the Maps object that shares selected specifications.

edit_annotations([q])

Toggle if annotations are editable or not.

edit_layout([filepath])

Activate the "layout-editor" to quickly re-arrange the positions of subplots.

fetch_companion_wms_layers([refetch])

Fetch (and cache) WebMap layer names for the companion-widget.

fetch_layers([layers])

Fetch (and cache) the layers of a map.

get_crs([crs])

Get the pyproj CRS instance of a given crs specification.

get_extent([crs])

Get the extent (x0, x1, y0, y1) of the map in the given coordinate system.

get_inset_position([precision])

Get the current inset position (and size).

get_layout([filepath, override, precision])

Get the positions of all axes within the current plot.

indicate_extent(x0, y0, x1, y1[, crs, npts])

Indicate a rectangular extent in a given crs on the map.

indicate_inset_extent(**kwargs)

inherit_classification(m)

Use the classification of another Maps-object when plotting the data.

inherit_data(m)

Use the data of another Maps-object (without copying).

join_limits(*args)

Join the x- and y- limits of the maps (crs must be equal!).

make_dataset_pickable()

Make the associated dataset pickable without plotting it first.

new_inset_map([xy, xy_crs, radius, ...])

Create a new (empty) inset-map that shows a zoomed-in view on a given extent.

new_layer([layer, inherit_data, ...])

Create a new Maps-object that shares the same plot-axes.

new_map([ax, keep_on_top, inherit_data, ...])

Create a new map that shares the figure with this Maps-object.

on_layer_activation(func[, layer, persistent])

Attach a callback that is executed if the associated layer is activated.

plot_map(*args, **kwargs)

Plot the dataset assigned to this Maps-object.

redraw(*args)

Force a re-draw of cached background layers.

refetch_wms_on_size_change()

Set the behavior of WebMap services with respect to size changes.

savefig(**kwargs)

Save the current figure.

set_classify_specs([scheme])

Set classification specifications for the data.

set_clipboard_kwargs(**kwargs)

Set GLOBAL savefig parameters for all Maps objects on export to the clipboard.

set_data([data, x, y, crs, encoding, cpos, ...])

Set the properties of the dataset you want to plot.

set_data_specs([data, x, y, crs, encoding, ...])

WARNING: m.set_data_specs(...) is depreciated! Use m.set_data(...) instead!

set_extent(extents[, crs])

Set the extent (x0, x1, y0, y1) of the map in the given coordinate system.

set_extent_to_location(location[, annotate, ...])

Set the map-extent based on a given location query.

set_frame([rounded])

Set the properties of the map boundary and the background patch.

set_inset_position([x, y, size])

Set the (center) position and size of the inset-map.

show([clear])

Show the map (only required for non-interactive matplotlib backends).

show_layer(*args[, clear])

Show a single layer or (transparently) overlay multiple selected layers.

snapshot(*layer[, transparent, clear])

Print a static image of the figure to the active IPython display.

subplots_adjust(**kwargs)

Update the subplot parameters of the grid.

text(x, y, s[, fontdict])

Add text to figure.

Attributes

BM

The Blit-Manager used to dynamically update the plots.

CLASSIFIERS

Accessor for available classification schemes.

add_feature

Interface to the feature-layers provided by NaturalEarth.

add_wms

A collection of open-access WebMap services that can be added to the maps.

all

Get a Maps-object on the "all" layer.

ax

The matplotlib (cartopy) GeoAxes associated with this Maps-object.

cb

Accessor for attaching callbacks and accessing return-objects.

coll

The collection representing the dataset plotted by m.plot_map().

colorbar

Get the most recently added colorbar of this Maps-object.

crs_plot

The crs used for plotting.

data

The data assigned to this Maps-object.

draw

Base-class for drawing shapes on a map.

f

The matplotlib Figure associated with this Maps-object.

layer

The layer-name associated with this Maps-object.

new_layer_from_file

A collection of methods to add a new layer to an existing Maps-object from a file.

parent

The parent-object to which this Maps-object is connected to.

set_classify

Interface to the classifiers provided by the 'mapclassify' module.

set_shape

Set the plot-shape to represent the data-points.

shape

The shape that is used to represent the dataset if m.plot_map() is called.

util

A collection of utility tools that can be added to EOmaps plots.