User reference

User reference for the prettymaps package.

prettymaps module

prettymaps.plot(query: str | Tuple[float, float] | GeoDataFrame, layers={}, style={}, preset='default', save_preset=None, update_preset=None, postprocessing=None, circle=None, radius=None, dilate=None, save_as=None, fig=None, ax=None, title=None, figsize=(12, 12), constrained_layout=True, credit={}, mode='matplotlib', multiplot=False, show=True, x=0, y=0, scale_x=1, scale_y=1, rotation=0)

Draw a map from OpenStreetMap data.

Parameters:
  • query (string) – The address to geocode and use as the central point around which to get the geometries

  • backup (dict) – (Optional) feed the output from a previous ‘plot()’ run to save time

  • postprocessing (function) – (Optional) Apply a postprocessing step to the ‘layers’ dict

  • radius – (Optional) If not None, draw the map centered around the address with this radius (in meters)

  • layers (dict) – Specify the name of each layer and the OpenStreetMap tags to fetch

  • style (dict) – Drawing params for each layer (matplotlib params such as ‘fc’, ‘ec’, ‘fill’, etc.)

  • osm_credit (dict) – OSM Caption parameters

  • figsize (Tuple) – (Optional) Width and Height (in inches) for the Matplotlib figure. Defaults to (10, 10)

  • ax (axes) – Matplotlib axes

  • title (String) – (Optional) Title for the Matplotlib figure

  • vsketch (Vsketch) – (Optional) Vsketch object for pen plotting

  • x (float) – (Optional) Horizontal displacement

  • y (float) – (Optional) Vertical displacement

  • scale_x (float) – (Optional) Horizontal scale factor

  • scale_y (float) – (Optional) Vertical scale factor

  • rotation (float) – (Optional) Rotation in angles (0-360)

Returns:

layers – Dictionary of layers (each layer is a Shapely MultiPolygon)

Return type:

dict

Notes