Python Figure Reference: scattermapbox Traces
plotly.graph_objects.Scattermapbox trace is a graph object in the figure's data list with any of the named arguments or attributes listed below. "scattermapbox" trace is deprecated! Please consider switching to the "scattermap" trace type and `map` subplots. Learn more at: https://plotly.com/python/maplibre-migration/ as well as https://plotly.com/javascript/maplibre-migration/ The data visualized as scatter point, lines or marker symbols on a Mapbox GL geographic map is provided by longitude/latitude pairs in `lon` and `lat`.
- name
Code:fig.update_traces(name=<VALUE>, selector=dict(type='scattermapbox'))
Type: stringSets the trace name. The trace name appears as the legend item and on hover.
- visible
Code:fig.update_traces(visible=<VALUE>, selector=dict(type='scattermapbox'))
Type: enumerated , one of (True|False|"legendonly")
Default:TrueDetermines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- showlegend
Code:fig.update_traces(showlegend=<VALUE>, selector=dict(type='scattermapbox'))
Type: boolean
Default:TrueDetermines whether or not an item corresponding to this trace is shown in the legend.
- legend
Code:fig.update_traces(legend=<VALUE>, selector=dict(type='scattermapbox'))
Type: subplotid
Default:legendSets the reference to a legend to show this trace in. References to these legends are "legend", "legend2", "legend3", etc. Settings for these legends are set in the layout, under `layout.legend`, `layout.legend2`, etc.
- legendrank
Code:fig.update_traces(legendrank=<VALUE>, selector=dict(type='scattermapbox'))
Type: number
Default:1000Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with "reversed" `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.
- legendgroup
Code:fig.update_traces(legendgroup=<VALUE>, selector=dict(type='scattermapbox'))
Type: string
Default:""Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- legendgrouptitle
Code:fig.update_traces(legendgrouptitle=dict(...), selector=dict(type='scattermapbox'))
Type: dict containing one or more of the keys listed below.- font
Code:fig.update_traces(legendgrouptitle_font=dict(...), selector=dict(type='scattermapbox'))
Type: dict containing one or more of the keys listed below.Sets this legend group's title font.
- color
Code:fig.update_traces(legendgrouptitle_font_color=<VALUE>, selector=dict(type='scattermapbox'))
Type: color - family
Code:fig.update_traces(legendgrouptitle_font_family=<VALUE>, selector=dict(type='scattermapbox'))
Type: stringHTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.
- lineposition
Code:fig.update_traces(legendgrouptitle_font_lineposition=<VALUE>, selector=dict(type='scattermapbox'))
Type: flaglist string. Any combination of"under","over","through"joined with a"+"OR"none".
Examples:"under","over","under+over","under+over+through","none"
Default:"none"Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations e.g. "under+over", etc.
- shadow
Code:fig.update_traces(legendgrouptitle_font_shadow=<VALUE>, selector=dict(type='scattermapbox'))
Type: string
Default:"none"Sets the shape and color of the shadow behind text. "auto" places minimal shadow and applies contrast text font color. See https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow for additional options.
- size
Code:fig.update_traces(legendgrouptitle_font_size=<VALUE>, selector=dict(type='scattermapbox'))
Type: number greater than or equal to 1 - style
Code:fig.update_traces(legendgrouptitle_font_style=<VALUE>, selector=dict(type='scattermapbox'))
Type: enumerated , one of ("normal"|"italic")
Default:"normal"Sets whether a font should be styled with a normal or italic face from its family.
- textcase
Code:fig.update_traces(legendgrouptitle_font_textcase=<VALUE>, selector=dict(type='scattermapbox'))
Type: enumerated , one of ("normal"|"word caps"|"upper"|"lower")
Default:"normal"Sets capitalization of text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized.
- variant
Code:fig.update_traces(legendgrouptitle_font_variant=<VALUE>, selector=dict(type='scattermapbox'))
Type: enumerated , one of ("normal"|"small-caps"|"all-small-caps"|"all-petite-caps"|"petite-caps"|"unicase")
Default:"normal"Sets the variant of the font.
- weight
Code:fig.update_traces(legendgrouptitle_font_weight=<VALUE>, selector=dict(type='scattermapbox'))
Type: integer between or equal to 1 and 1000
Default:normalSets the weight (or boldness) of the font.
- color
- text
Code:fig.update_traces(legendgrouptitle_text=<VALUE>, selector=dict(type='scattermapbox'))
Type: string
Default:""Sets the title of the legend group.
- font
- legendwidth
Code:fig.update_traces(legendwidth=<VALUE>, selector=dict(type='scattermapbox'))
Type: number greater than or equal to 0Sets the width (in px or fraction) of the legend for this trace.
- opacity
Code:fig.update_traces(opacity=<VALUE>, selector=dict(type='scattermapbox'))
Type: number between or equal to 0 and 1
Default:1Sets the opacity of the trace.
- mode
Code:fig.update_traces(mode=<VALUE>, selector=dict(type='scattermapbox'))
Type: flaglist string. Any combination of"lines","markers","text"joined with a"+"OR"none".
Examples:"lines","markers","lines+markers","lines+markers+text","none"
Default:"markers"Determines the drawing mode for this scatter trace. If the provided `mode` includes "text" then the `text` elements appear at the coordinates. Otherwise, the `text` elements appear on hover.
- ids
Code:fig.update_traces(ids=<VALUE>, selector=dict(type='scattermapbox'))
Type: list, numpy array, or Pandas series of numbers, strings, or datetimes.Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
- lat
Code:fig.update_traces(lat=<VALUE>, selector=dict(type='scattermapbox'))
Type: list, numpy array, or Pandas series of numbers, strings, or datetimes.Sets the latitude coordinates (in degrees North).
- lon
Code:fig.update_traces(lon=<VALUE>, selector=dict(type='scattermapbox'))
Type: list, numpy array, or Pandas series of numbers, strings, or datetimes.Sets the longitude coordinates (in degrees East).
- cluster
Code:fig.update_traces(cluster=dict(...), selector=dict(type='scattermapbox'))
Type: dict containing one or more of the keys listed below.- color
Code:fig.update_traces(cluster_color=<VALUE>, selector=dict(type='scattermapbox'))
Type: color or array of colorsSets the color for each cluster step.
- enabled
Code:fig.update_traces(cluster_enabled=<VALUE>, selector=dict(type='scattermapbox'))
Type: booleanDetermines whether clustering is enabled or disabled.
- maxzoom
Code:fig.update_traces(cluster_maxzoom=<VALUE>, selector=dict(type='scattermapbox'))
Type: number between or equal to 0 and 24
Default:24Sets the maximum zoom level. At zoom levels equal to or greater than this, points will never be clustered.
- opacity
Code:fig.update_traces(cluster_opacity=<VALUE>, selector=dict(type='scattermapbox'))
Type: number or array of numbers between or equal to 0 and 1
Default:1Sets the marker opacity.
- size
Code:fig.update_traces(cluster_size=<VALUE>, selector=dict(type='scattermapbox'))
Type: number or array of numbers greater than or equal to 0
Default:20Sets the size for each cluster step.
- step
Code:fig.update_traces(cluster_step=<VALUE>, selector=dict(type='scattermapbox'))
Type: number or array of numbers greater than or equal to -1
Default:-1Sets how many points it takes to create a cluster or advance to the next cluster step. Use this in conjunction with arrays for `size` and / or `color`. If an integer, steps start at multiples of this number. If an array, each step extends from the given value until one less than the next value.
- color
- text
Code:fig.update_traces(text=<VALUE>, selector=dict(type='scattermapbox'))
Type: string or array of strings
Default:""Sets text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (lon,lat) coordinates. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels.
- textposition
Code:fig.update_traces(textposition=<VALUE>, selector=dict(type='scattermapbox'))
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.
- texttemplate
Code:fig.update_traces(texttemplate=<VALUE>, selector=dict(type='scattermapbox'))
Type: string or array of strings
Default:""Template string used for rendering the information text that appears on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example "y: %{y}". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can't be found will be replaced with the specifier. For example, a template of "data: %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that are `arrayOk: True`) are available. Finally, the template string has access to variables `lat`, `lon` and `text`.
- texttemplatefallback
Code:fig.update_traces(texttemplatefallback=<VALUE>, selector=dict(type='scattermapbox'))
Type: number or categorical coordinate string
Default:-Fallback string that's displayed when a variable referenced in a template is missing. If the boolean value 'False' is passed in, the specifier with the missing variable will be displayed.
- hovertext
Code: