Black Lives Matter. Please consider donating to Black Girls Code today.

Python Figure Reference: layout.mapbox

  • mapbox
    Code: fig.update_mapboxes(...)
    Type: dict containing one or more of the keys listed below.
    • domain
      Code: fig.update_mapboxes(domain=dict(...))
      Type: dict containing one or more of the keys listed below.
      • x
        Code: fig.update_mapboxes(domain_x=<VALUE>)
        Type: list
        Default: [0, 1]

        Sets the horizontal domain of this mapbox subplot (in plot fraction).

      • y
        Code: fig.update_mapboxes(domain_y=<VALUE>)
        Type: list
        Default: [0, 1]

        Sets the vertical domain of this mapbox subplot (in plot fraction).

      • row
        Code: fig.update_mapboxes(domain_row=<VALUE>)
        Type: integer greater than or equal to 0
        Default: 0

        If there is a layout grid, use the domain for this row in the grid for this mapbox subplot .

      • column
        Code: fig.update_mapboxes(domain_column=<VALUE>)
        Type: integer greater than or equal to 0
        Default: 0

        If there is a layout grid, use the domain for this column in the grid for this mapbox subplot .

    • accesstoken
      Code: fig.update_mapboxes(accesstoken=<VALUE>)
      Type: string

      Sets the mapbox access token to be used for this mapbox map. Alternatively, the mapbox access token can be set in the configuration options under `mapboxAccessToken`. Note that accessToken are only required when `style` (e.g with values : basic, streets, outdoors, light, dark, satellite, satellite-streets ) and/or a layout layer references the Mapbox server.

    • style
      Code: fig.update_mapboxes(style=<VALUE>)
      Type: number or categorical coordinate string
      Default: basic

      Defines the map layers that are rendered by default below the trace layers defined in `data`, which are themselves by default rendered below the layers defined in `layout.mapbox.layers`. These layers can be defined either explicitly as a Mapbox Style object which can contain multiple layer definitions that load data from any public or private Tile Map Service (TMS or XYZ) or Web Map Service (WMS) or implicitly by using one of the built-in style objects which use WMSes which do not require any access tokens, or by using a default Mapbox style or custom Mapbox style URL, both of which require a Mapbox access token Note that Mapbox access token can be set in the `accesstoken` attribute or in the `mapboxAccessToken` config option. Mapbox Style objects are of the form described in the Mapbox GL JS documentation available at https://docs.mapbox.com/mapbox-gl-js/style-spec The built-in plotly.js styles objects are: open-street-map, white-bg, carto-positron, carto-darkmatter, stamen-terrain, stamen-toner, stamen-watercolor The built-in Mapbox styles are: basic, streets, outdoors, light, dark, satellite, satellite-streets Mapbox style URLs are of the form: mapbox://mapbox.mapbox-<name>-<version>

    • center
      Code: fig.update_mapboxes(center=dict(...))
      Type: dict containing one or more of the keys listed below.
      • lon
        Code: fig.update_mapboxes(center_lon=<VALUE>)
        Type: number
        Default: 0

        Sets the longitude of the center of the map (in degrees East).

      • lat
        Code: fig.update_mapboxes(center_lat=<VALUE>)
        Type: number
        Default: 0

        Sets the latitude of the center of the map (in degrees North).

    • zoom
      Code: fig.update_mapboxes(zoom=<VALUE>)
      Type: number
      Default: 1

      Sets the zoom level of the map (mapbox.zoom).

    • bearing
      Code: fig.update_mapboxes(bearing=<VALUE>)
      Type: number
      Default: 0

      Sets the bearing angle of the map in degrees counter-clockwise from North (mapbox.bearing).

    • pitch
      Code: fig.update_mapboxes(pitch=<VALUE>)
      Type: number
      Default: 0

      Sets the pitch angle of the map (in degrees, where "0" means perpendicular to the surface of the map) (mapbox.pitch).

    • layers
      Code: fig.update_mapboxes(layers=list(...))
      Type: list of dict where each dict has one or more of the keys listed below.
      • visible
        Parent: layout.mapbox.layers[]
        Type: boolean
        Default: True

        Determines whether this layer is displayed

      • sourcetype
        Parent: layout.mapbox.layers[]
        Type: enumerated , one of ( "geojson" | "vector" | "raster" | "image" )
        Default: "geojson"

        Sets the source type for this layer, that is the type of the layer data.

      • source
        Parent: layout.mapbox.layers[]
        Type: number or categorical coordinate string

        Sets the source data for this layer (mapbox.layer.source). When `sourcetype` is set to "geojson", `source` can be a URL to a GeoJSON or a GeoJSON object. When `sourcetype` is set to "vector" or "raster", `source` can be a URL or an array of tile URLs. When `sourcetype` is set to "image", `source` can be a URL to an image.

      • sourcelayer
        Parent: layout.mapbox.layers[]
        Type: string
        Default: ""

        Specifies the layer to use from a vector tile source (mapbox.layer.source-layer). Required for "vector" source type that supports multiple layers.

      • sourceattribution
        Parent: layout.mapbox.layers[]
        Type: string

        Sets the attribution for this source.

      • type
        Parent: layout.mapbox.layers[]
        Type: enumerated , one of ( "circle" | "line" | "fill" | "symbol" | "raster" )
        Default: "circle"

        Sets the layer type, that is the how the layer data set in `source` will be rendered With `sourcetype` set to "geojson", the following values are allowed: "circle", "line", "fill" and "symbol". but note that "line" and "fill" are not compatible with Point GeoJSON geometries. With `sourcetype` set to "vector", the following values are allowed: "circle", "line", "fill" and "symbol". With `sourcetype` set to "raster" or `"image"`, only the "raster" value is allowed.

      • coordinates
        Parent: layout.mapbox.layers[]
        Type: number or categorical coordinate string

        Sets the coordinates array contains [longitude, latitude] pairs for the image corners listed in clockwise order: top left, top right, bottom right, bottom left. Only has an effect for "image" `sourcetype`.

      • below
        Parent: layout.mapbox.layers[]
        Type: string

        Determines if the layer will be inserted before the layer with the specified ID. If omitted or set to '', the layer will be inserted above every existing layer.

      • color
        Parent: layout.mapbox.layers[]
        Type: color
        Default: "#444"

        Sets the primary layer color. If `type` is "circle", color corresponds to the circle color (mapbox.layer.paint.circle-color) If `type` is "line", color corresponds to the line color (mapbox.layer.paint.line-color) If `type` is "fill", color corresponds to the fill color (mapbox.layer.paint.fill-color) If `type` is "symbol", color corresponds to the icon color (mapbox.layer.paint.icon-color)

      • opacity
        Parent: layout.mapbox.layers[]
        Type: number between or equal to 0 and 1
        Default: 1

        Sets the opacity of the layer. If `type` is "circle", opacity corresponds to the circle opacity (mapbox.layer.paint.circle-opacity) If `type` is "line", opacity corresponds to the line opacity (mapbox.layer.paint.line-opacity) If `type` is "fill", opacity corresponds to the fill opacity (mapbox.layer.paint.fill-opacity) If `type` is "symbol", opacity corresponds to the icon/text opacity (mapbox.layer.paint.text-opacity)

      • minzoom
        Parent: layout.mapbox.layers[]
        Type: number between or equal to 0 and 24
        Default: 0

        Sets the minimum zoom level (mapbox.layer.minzoom). At zoom levels less than the minzoom, the layer will be hidden.

      • maxzoom
        Parent: layout.mapbox.layers[]
        Type: number between or equal to 0 and 24
        Default: 24

        Sets the maximum zoom level (mapbox.layer.maxzoom). At zoom levels equal to or greater than the maxzoom, the layer will be hidden.

      • circle
        Parent: layout.mapbox.layers[]
        Type: dict containing one or more of the keys listed below.
        • radius
          Parent: layout.mapbox.layers[].circle
          Type: number
          Default: 15

          Sets the circle radius (mapbox.layer.paint.circle-radius). Has an effect only when `type` is set to "circle".

      • line
        Parent: layout.mapbox.layers[]
        Type: dict containing one or more of the keys listed below.
        • width
          Parent: layout.mapbox.layers[].line
          Type: number
          Default: 2

          Sets the line width (mapbox.layer.paint.line-width). Has an effect only when `type` is set to "line".

        • dash
          Parent: layout.mapbox.layers[].line
          Type: list, numpy array, or Pandas series of numbers, strings, or datetimes.

          Sets the length of dashes and gaps (mapbox.layer.paint.line-dasharray). Has an effect only when `type` is set to "line".

      • fill
        Parent: layout.mapbox.layers[]
        Type: dict containing one or more of the keys listed below.
        • outlinecolor
          Parent: layout.mapbox.layers[].fill
          Type: color
          Default: "#444"

          Sets the fill outline color (mapbox.layer.paint.fill-outline-color). Has an effect only when `type` is set to "fill".

      • symbol
        Parent: layout.mapbox.layers[]
        Type: dict containing one or more of the keys listed below.
        • icon
          Parent: layout.mapbox.layers[].symbol
          Type: string
          Default: "marker"

          Sets the symbol icon image (mapbox.layer.layout.icon-image). Full list: https://www.mapbox.com/maki-icons/

        • iconsize
          Parent: layout.mapbox.layers[].symbol
          Type: number
          Default: 10

          Sets the symbol icon size (mapbox.layer.layout.icon-size). Has an effect only when `type` is set to "symbol".

        • text
          Parent: layout.mapbox.layers[].symbol
          Type: string
          Default: ""

          Sets the symbol text (mapbox.layer.layout.text-field).

        • placement
          Parent: layout.mapbox.layers[].symbol
          Type: enumerated , one of ( "point" | "line" | "line-center" )
          Default: "point"

          Sets the symbol and/or text placement (mapbox.layer.layout.symbol-placement). If `placement` is "point", the label is placed where the geometry is located If `placement` is "line", the label is placed along the line of the geometry If `placement` is "line-center", the label is placed on the center of the geometry

        • textfont
          Parent: layout.mapbox.layers[].symbol
          Type: dict containing one or more of the keys listed below.

          Sets the icon text font (color=mapbox.layer.paint.text-color, size=mapbox.layer.layout.text-size). Has an effect only when `type` is set to "symbol".

          • family
            Parent: layout.mapbox.layers[].symbol.textfont
            Type: string
            Default: "Open Sans Regular, Arial Unicode MS Regular"

            HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include "Arial", "Balto", "Courier New", "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman".

          • size
            Parent: layout.mapbox.layers[].symbol.textfont
            Type: number greater than or equal to 1
          • color
            Parent: layout.mapbox.layers[].symbol.textfont
            Type: color
        • textposition
          Parent: layout.mapbox.layers[].symbol
          Type: enumerated , one of ( "top left" | "top center" | "top right" | "middle left" | "middle center" | "middle right" | "bottom left" | "bottom center" | "bottom right" )
          Default: "middle center"

          Sets the positions of the `text` elements with respects to the (x,y) coordinates.

      • name
        Parent: layout.mapbox.layers[]
        Type: string

        When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` alongside your modifications (including `visible: False` or `enabled: False` to hide it). Has no effect outside of a template.

      • templateitemname
        Parent: layout.mapbox.layers[]
        Type: string

        Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with `templateitemname` matching its `name`, alongside your modifications (including `visible: False` or `enabled: False` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: True`.

    • uirevision
      Code: fig.update_mapboxes(uirevision=<VALUE>)
      Type: number or categorical coordinate string

      Controls persistence of user-driven changes in the view: `center`, `zoom`, `bearing`, `pitch`. Defaults to `layout.uirevision`.