Maps.plot_map(layer=None, dynamic=False, set_extent=True, assume_sorted=True, indicate_masked_points=False, **kwargs)

Plot the dataset assigned to this Maps-object.

  • To set the data, see m.set_data()

  • To change the “shape” that is used to represent the datapoints, see m.set_shape.

  • To classify the data, see m.set_classify or m.set_classify_specs()


Each call to plot_map(…) will override the previously plotted dataset!

If you want to plot multiple datasets, use a new layer for each dataset! (e.g. via m2 = m.new_layer())

  • layer (str or None) –

    The layer at which the dataset will be plotted. ONLY relevant if dynamic = False!

    • If “all”: the corresponding feature will be added to ALL layers

    • If None, the layer assigned to the Maps object is used (e.g. m.layer)

    The default is None.

  • dynamic (bool) – If True, the collection will be dynamically updated.

  • set_extent (bool) –

    Set the plot-extent to the data-extent.

    • if True: The plot-extent will be set to the extent of the data-coordinates

    • if False: The plot-extent is kept as-is

    The default is True

  • assume_sorted (bool, optional) –

    ONLY relevant for the shapes “raster” and “shade_raster” (and only if coordinates are provided as 1D arrays and data is a 2D array)

    Sort values with respect to the coordinates prior to plotting (required for QuadMesh if unsorted coordinates are provided)

    The default is True.

  • indicate_masked_points (bool or dict) –

    If False, masked points are not indicated.

    If True, any datapoints that could not be properly plotted with the currently assigned shape are indicated with a circle with a red boundary.

    If a dict is provided, it can be used to update the appearance of the masked points (arguments are passed to matpltolibs plt.scatter()) (‘s’: markersize, ‘marker’: the shape of the marker, …)

    The default is False

  • vmin (float, optional) – Min- and max. values assigned to the colorbar. The default is None.

  • vmax (float, optional) – Min- and max. values assigned to the colorbar. The default is None.

  • zorder (float) – The zorder of the artist (e.g. the stacking level of overlapping artists) The default is 1

  • kwargs

    kwargs passed to the initialization of the matpltolib collection (dependent on the plot-shape) [linewidth, edgecolor, facecolor, …]

    For “shade_points” or “shade_raster” shapes, kwargs are passed to datashader.mpl_ext.dsshow