Python Figure Reference: layout.mapbox

  • mapbox
    Code: fig.update_mapboxes(...)
    Type: dict containing one or more of the keys listed below.
    • 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.

    • 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).

    • bounds
      Code: fig.update_mapboxes(bounds=dict(...))
      Type: dict containing one or more of the keys listed below.
      • east
        Code: fig.update_mapboxes(bounds_east=<VALUE>)
        Type: number

        Sets the maximum longitude of the map (in degrees East) if `west`, `south` and `north` are declared.

      • north
        Code: fig.update_mapboxes(bounds_north=<VALUE>)
        Type: number

        Sets the maximum latitude of the map (in degrees North) if `east`, `west` and `south` are declared.

      • south
        Code: fig.update_mapboxes(bounds_south=<VALUE>)
        Type: number

        Sets the minimum latitude of the map (in degrees North) if `east`, `west` and `north` are declared.

      • west
        Code: fig.update_mapboxes(bounds_west=<VALUE>)
        Type: number

        Sets the minimum longitude of the map (in degrees East) if `east`, `south` and `north` are declared.

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

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

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

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

    • domain
      Code: fig.update_mapboxes(domain=dict(...))
      Type: dict containing one or more of the keys listed below.
      • 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 .

      • 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 .

      • x
        Code: fig.update_mapboxes(domain_x=list(...))
        Type: list
        Default: [0, 1]

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

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

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

    • layers
      Code: fig.update_mapboxes(layers=list(...))
      Type: list of dict where each dict has one or more of the keys listed below.
      • 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.

      • 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".

      • 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)

      • 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`.

      • 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".

      • line
        Parent: layout.mapbox.layers[]
        Type: dict containing one or more of the keys listed below.
        • 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".

        • 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".

      • 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.

      • 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.

      • 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.

      • 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)

      • 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.

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

        Sets the attribution for this source.

      • 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.

      • 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.

      • 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".

        • 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

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

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

        • 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".

          • color
            Parent: layout.mapbox.layers[].symbol.textfont
            Type: color
          • 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
          • style
            Parent: layout.mapbox.layers[].symbol.textfont
            Type: enumerated , one of ( "normal" | "italic" )
            Default: "normal"

            Sets whether a font should be styled with a normal or italic face from its family.

          • weight
            Parent: layout.mapbox.layers[].symbol.textfont
            Type: integer between or equal to 1 and 1000
            Default: normal

            Sets the weight (or boldness) of the font.

        • 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.

      • 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`.

      • 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.

      • visible
        Parent: layout.mapbox.layers[]
        Type: boolean
        Default: True

        Determines whether this layer is displayed

    • 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).

    • 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: carto-darkmatter, carto-positron, open-street-map, stamen-terrain, stamen-toner, stamen-watercolor, white-bg 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>

    • 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`.

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

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