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

JavaScript Figure Reference: layout.geo

  • geo
    Parent: layout
    Type: object containing one or more of the keys listed below.
    • domain
      Parent: layout.geo
      Type: object containing one or more of the keys listed below.
      • x
        Parent: layout.geo.domain
        Type: array
        Default: [0, 1]

        Sets the horizontal domain of this geo subplot (in plot fraction). Note that geo subplots are constrained by domain. In general, when `projection.scale` is set to 1. a map will fit either its x or y domain, but not both.

      • y
        Parent: layout.geo.domain
        Type: array
        Default: [0, 1]

        Sets the vertical domain of this geo subplot (in plot fraction). Note that geo subplots are constrained by domain. In general, when `projection.scale` is set to 1. a map will fit either its x or y domain, but not both.

      • row
        Parent: layout.geo.domain
        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 geo subplot . Note that geo subplots are constrained by domain. In general, when `projection.scale` is set to 1. a map will fit either its x or y domain, but not both.

      • column
        Parent: layout.geo.domain
        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 geo subplot . Note that geo subplots are constrained by domain. In general, when `projection.scale` is set to 1. a map will fit either its x or y domain, but not both.

    • fitbounds
      Parent: layout.geo
      Type: enumerated , one of ( false | "locations" | "geojson" )

      Determines if this subplot's view settings are auto-computed to fit trace data. On scoped maps, setting `fitbounds` leads to `center.lon` and `center.lat` getting auto-filled. On maps with a non-clipped projection, setting `fitbounds` leads to `center.lon`, `center.lat`, and `projection.rotation.lon` getting auto-filled. On maps with a clipped projection, setting `fitbounds` leads to `center.lon`, `center.lat`, `projection.rotation.lon`, `projection.rotation.lat`, `lonaxis.range` and `lonaxis.range` getting auto-filled. If "locations", only the trace's visible locations are considered in the `fitbounds` computations. If "geojson", the entire trace input `geojson` (if provided) is considered in the `fitbounds` computations, Defaults to "false".

    • resolution
      Parent: layout.geo
      Type: enumerated , one of ( "110" | "50" )
      Default: "110"

      Sets the resolution of the base layers. The values have units of km/mm e.g. 110 corresponds to a scale ratio of 1:110,000,000.

    • scope
      Parent: layout.geo
      Type: enumerated , one of ( "world" | "usa" | "europe" | "asia" | "africa" | "north america" | "south america" )
      Default: "world"

      Set the scope of the map.

    • projection
      Parent: layout.geo
      Type: object containing one or more of the keys listed below.
      • type
        Parent: layout.geo.projection
        Type: enumerated , one of ( "equirectangular" | "mercator" | "orthographic" | "natural earth" | "kavrayskiy7" | "miller" | "robinson" | "eckert4" | "azimuthal equal area" | "azimuthal equidistant" | "conic equal area" | "conic conformal" | "conic equidistant" | "gnomonic" | "stereographic" | "mollweide" | "hammer" | "transverse mercator" | "albers usa" | "winkel tripel" | "aitoff" | "sinusoidal" )

        Sets the projection type.

      • rotation
        Parent: layout.geo.projection
        Type: object containing one or more of the keys listed below.
        • lon
          Parent: layout.geo.projection.rotation
          Type: number

          Rotates the map along parallels (in degrees East). Defaults to the center of the `lonaxis.range` values.

        • lat
          Parent: layout.geo.projection.rotation
          Type: number

          Rotates the map along meridians (in degrees North).

        • roll
          Parent: layout.geo.projection.rotation
          Type: number

          Roll the map (in degrees) For example, a roll of "180" makes the map appear upside down.

      • parallels
        Parent: layout.geo.projection
        Type: array

        For conic projection types only. Sets the parallels (tangent, secant) where the cone intersects the sphere.

      • scale
        Parent: layout.geo.projection
        Type: number greater than or equal to 0
        Default: 1

        Zooms in or out on the map view. A scale of "1" corresponds to the largest zoom level that fits the map's lon and lat ranges.

    • center
      Parent: layout.geo
      Type: object containing one or more of the keys listed below.
      • lon
        Parent: layout.geo.center
        Type: number

        Sets the longitude of the map's center. By default, the map's longitude center lies at the middle of the longitude range for scoped projection and above `projection.rotation.lon` otherwise.

      • lat
        Parent: layout.geo.center
        Type: number

        Sets the latitude of the map's center. For all projection types, the map's latitude center lies at the middle of the latitude range by default.

    • visible
      Parent: layout.geo
      Type: boolean
      Default: true

      Sets the default visibility of the base layers.

    • showcoastlines
      Parent: layout.geo
      Type: boolean

      Sets whether or not the coastlines are drawn.

    • coastlinecolor
      Parent: layout.geo
      Type: color
      Default: "#444"

      Sets the coastline color.

    • coastlinewidth
      Parent: layout.geo
      Type: number greater than or equal to 0
      Default: 1

      Sets the coastline stroke width (in px).

    • showland
      Parent: layout.geo
      Type: boolean

      Sets whether or not land masses are filled in color.

    • landcolor
      Parent: layout.geo
      Type: color
      Default: "#F0DC82"

      Sets the land mass color.

    • showocean
      Parent: layout.geo
      Type: boolean

      Sets whether or not oceans are filled in color.

    • oceancolor
      Parent: layout.geo
      Type: color
      Default: "#3399FF"

      Sets the ocean color

    • showlakes
      Parent: layout.geo
      Type: boolean

      Sets whether or not lakes are drawn.

    • lakecolor
      Parent: layout.geo
      Type: color
      Default: "#3399FF"

      Sets the color of the lakes.

    • showrivers
      Parent: layout.geo
      Type: boolean

      Sets whether or not rivers are drawn.

    • rivercolor
      Parent: layout.geo
      Type: color
      Default: "#3399FF"

      Sets color of the rivers.

    • riverwidth
      Parent: layout.geo
      Type: number greater than or equal to 0
      Default: 1

      Sets the stroke width (in px) of the rivers.

    • showcountries
      Parent: layout.geo
      Type: boolean

      Sets whether or not country boundaries are drawn.

    • countrycolor
      Parent: layout.geo
      Type: color
      Default: "#444"

      Sets line color of the country boundaries.

    • countrywidth
      Parent: layout.geo
      Type: number greater than or equal to 0
      Default: 1

      Sets line width (in px) of the country boundaries.

    • showsubunits
      Parent: layout.geo
      Type: boolean

      Sets whether or not boundaries of subunits within countries (e.g. states, provinces) are drawn.

    • subunitcolor
      Parent: layout.geo
      Type: color
      Default: "#444"

      Sets the color of the subunits boundaries.

    • subunitwidth
      Parent: layout.geo
      Type: number greater than or equal to 0
      Default: 1

      Sets the stroke width (in px) of the subunits boundaries.

    • showframe
      Parent: layout.geo
      Type: boolean

      Sets whether or not a frame is drawn around the map.

    • framecolor
      Parent: layout.geo
      Type: color
      Default: "#444"

      Sets the color the frame.

    • framewidth
      Parent: layout.geo
      Type: number greater than or equal to 0
      Default: 1

      Sets the stroke width (in px) of the frame.

    • bgcolor
      Parent: layout.geo
      Type: color
      Default: "#fff"

      Set the background color of the map

    • lonaxis
      Parent: layout.geo
      Type: object containing one or more of the keys listed below.
      • range
        Parent: layout.geo.lonaxis
        Type: array

        Sets the range of this axis (in degrees), sets the map's clipped coordinates.

      • showgrid
        Parent: layout.geo.lonaxis
        Type: boolean

        Sets whether or not graticule are shown on the map.

      • tick0
        Parent: layout.geo.lonaxis
        Type: number
        Default: 0

        Sets the graticule's starting tick longitude/latitude.

      • dtick
        Parent: layout.geo.lonaxis
        Type: number

        Sets the graticule's longitude/latitude tick step.

      • gridcolor
        Parent: layout.geo.lonaxis
        Type: color
        Default: "#eee"

        Sets the graticule's stroke color.

      • gridwidth
        Parent: layout.geo.lonaxis
        Type: number greater than or equal to 0
        Default: 1

        Sets the graticule's stroke width (in px).

    • lataxis
      Parent: layout.geo
      Type: object containing one or more of the keys listed below.
      • range
        Parent: layout.geo.lataxis
        Type: array

        Sets the range of this axis (in degrees), sets the map's clipped coordinates.

      • showgrid
        Parent: layout.geo.lataxis
        Type: boolean

        Sets whether or not graticule are shown on the map.

      • tick0
        Parent: layout.geo.lataxis
        Type: number
        Default: 0

        Sets the graticule's starting tick longitude/latitude.

      • dtick
        Parent: layout.geo.lataxis
        Type: number

        Sets the graticule's longitude/latitude tick step.

      • gridcolor
        Parent: layout.geo.lataxis
        Type: color
        Default: "#eee"

        Sets the graticule's stroke color.

      • gridwidth
        Parent: layout.geo.lataxis
        Type: number greater than or equal to 0
        Default: 1

        Sets the graticule's stroke width (in px).

    • uirevision
      Parent: layout.geo
      Type: number or categorical coordinate string

      Controls persistence of user-driven changes in the view (projection and center). Defaults to `layout.uirevision`.