Maps.cb.pick.add_temporary_artist#

pick.add_temporary_artist(*artists, layer=None)#

Make an artist temporary (remove it from the map at the next event).

Parameters:
  • artists (matplotlib.artist) – The artist(s) to use as temporary artists.

  • layer (str or None, optional) – The layer to put the artist on. If None, the layer of the used Maps-object is used. (e.g. m.layer)

Examples

Add artists that will be removed with the next click on the map.

>>> m = Maps()
>>> text = m.ax.text(45, 45, "click map to remove")
>>> line, = m.ax.plot([10,20,50])
>>>
>>> m.cb.click.add_temporary_artist(text, line)