天天看点

【Python百日进阶-数据分析】Day121 - Plotly Figure参数: 散点图(三)marker 标记

文章目录

      • marker 标记

marker 标记

代码: fig.update_traces(marker=dict(…), selector=dict(type=‘scatter’))

类型:包含下面列出的一个或多个键的字典。

  • autocolorscale 自动色标

    代码: fig.update_traces(marker_autocolorscale=, selector=dict(type=‘scatter’))

    类型: boolean

    默认值: True

    确定色阶是默认调色板(

    autocolorscale: True

    )还是由

    marker.colorscale

    确定的调色板。仅当在

    marker.color

    中设置为数值数组时才有效。如果未指定

    colorscale

    autocolorscale

    为 True,将根据

    color

    数组中的数字是全正、全负还是混合来选择默认调色板。
  • cauto

    代码: fig.update_traces(marker_cauto=, selector=dict(type=‘scatter’))

    类型: boolean

    默认值: True

    确定是否相对于输入数据(此处在

    marker.color

    中)或在

    marker.cmin

    marker.cmax

    中设置的边界计算颜色域 仅当在

    marker.color

    中时才有效`被设置为一个数值数组。当“marker.cmin”和“marker.cmax”由用户设置时,默认为“False”。
  • cmax 最大值

    代码: fig.update_traces(marker_cmax=, selector=dict(type=‘scatter’))

    类型:编号

    设置色域的上限。仅当在

    marker.color

    中设置为数值数组时才有效。值应该与

    marker.color

    中的单位相同,如果设置,也必须设置

    marker.cmin

  • cmid

    代码: fig.update_traces(marker_cmid=, selector=dict(type=‘scatter’))

    类型:编号

    通过将

    marker.cmin

    和/或

    marker.cmax

    缩放为与该点等距来设置颜色域的中点。仅当在

    marker.color

    中设置为数值数组时才有效。值应该与

    marker.color

    中的单位相同。当

    marker.cauto

    False

    时无效。
  • cmin

    代码: fig.update_traces(marker_cmin=, selector=dict(type=‘scatter’))

    类型:编号

    设置色域的下限。仅当在

    marker.color

    中设置为数值数组时才有效。值应该与

    marker.color

    中的单位相同,如果设置,也必须设置

    marker.cmax

  • color

    代码: fig.update_traces(marker_color=, selector=dict(type=‘scatter’))

    类型:颜色或颜色数组

    设置标记颜色。它接受特定颜色或数字数组,这些数字映射到相对于数组的最大值和最小值或相对于

    marker.cmin

    marker.cmax

    (如果设置)的色阶。
  • coloraxis

    代码: fig.update_traces(marker_coloraxis=, selector=dict(type=‘scatter’))

    类型: subplotid

    设置对共享颜色轴的引用。这些共享色轴的引用是“coloraxis”、“coloraxis2”、“coloraxis3”等。这些共享色轴的设置在布局中设置,在

    layout.coloraxis

    layout.coloraxis2

    等下。注意多个色标可以链接到同一个色轴。
  • colorbar

    代码: fig.update_traces(marker_colorbar=dict(…), selector=dict(type=‘scatter’))

    类型:包含下面列出的一个或多个键的字典。

    • bgcolor 背景色

      代码: fig.update_traces(marker_colorbar_bgcolor=, selector=dict(type=‘scatter’))

      类型:颜色

      默认值: “rgba(0,0,0,0)”

      设置填充区域的颜色。

    • bordercolor 边框颜色

      代码: fig.update_traces(marker_colorbar_bordercolor=, selector=dict(type=‘scatter’))

      类型:颜色

      默认值: “#444”

      设置轴线颜色。

    • borderwidth 边框宽度

      代码: fig.update_traces(marker_colorbar_borderwidth=, selector=dict(type=‘scatter’))

      类型:大于或等于 0 的数字

      默认: 0

      设置宽度(以像素为单位)或包围此颜色条的边框。

    • dtick

      代码: fig.update_traces(marker_colorbar_dtick=, selector=dict(type=‘scatter’))

      类型:数字或分类坐标字符串

      设置此轴上刻度之间的步长。与

      tick0

      一起使用。必须是正数或可用于“日志”和“日期”轴的特殊字符串。如果轴

      type

      是“log”,则每 10^(n"dtick) 设置一个刻度,其中 n 是刻度编号。例如,在 1, 10, 100, 1000, …将 dtick 设置为 1。要将刻度线设置为 1、100、10000,…将 dtick 设置为 2。要将刻度线设置为 1、5、25、125、625、3125,…将 dtick 设置为 log_10(5 ), 或 0.69897000433. “log” 有几个特殊值; “L”, 其中

      f

      是一个正数, 给出值线性间隔的刻度 (但不是位置). 例如

      tick0

      = 0.1,

      dtick

      = “L0.5” 将在 0.1, 0.6, 1.1, 1.6 等处放置刻度。要显示 10 的幂加小数字之间的数字,请使用 “D1”(所有数字)或 “D2” (只有 2 和 5)。“D1”和“D2”忽略

      tick0

      。如果轴

      type

      是“日期”,那么您必须将时间转换为毫秒。例如,要将刻度间隔设置为一天,请将

      dtick

      设置为 86400000.0。“date” 也有特殊值 “M” 给出间隔数个月的刻度。

      n

      必须是正整数。要在每三个月的 15 日设置刻度,请将

      tick0

      设置为“2000-01-15”并将

      dtick

      设置为“M3”。要每 4 年设置一次刻度,请将

      dtick

      设置为“M48” 给出间隔数个月的刻度。

      n

      必须是正整数。要在每三个月的 15 日设置刻度,请将

      tick0

      设置为“2000-01-15”并将

      dtick

      设置为“M3”。要每 4 年设置一次刻度,请将

      dtick

      设置为“M48” 给出间隔数个月的刻度。

      n

      必须是正整数。要在每三个月的 15 日设置刻度,请将

      tick0

      设置为“2000-01-15”并将

      dtick

      设置为“M3”。要每 4 年设置一次刻度,请将

      dtick

      设置为“M48”
    • exponentformat 指数格式

      代码: fig.update_traces(marker_colorbar_exponentformat=, selector=dict(type=‘scatter’))

      类型: enumerated , ( “none”| “e”| “E”| “power”| “SI”| “B”) 之一

      默认: “B”

      确定刻度指数的格式规则。例如,考虑数字 1,000,000,000。如果“无”,则显示为 1,000,000,000。如果是“e”,则为 1e+9。如果是“E”,则 1E+9。如果是“power”,则为 1x10^9(超级脚本中为 9)。如果是“SI”,则为 1G。如果是“B”,则为 1B。

    • len

      代码: fig.update_traces(marker_colorbar_len=, selector=dict(type=‘scatter’))

      类型:大于或等于 0 的数字

      默认: 1

      设置颜色条的长度 此度量不包括两端的填充。也就是说,彩条长度是这个长度减去两端的填充。

    • lenmode

      代码: fig.update_traces(marker_colorbar_lenmode=, selector=dict(type=‘scatter’))

      类型: enumerated , ( “fraction”| “pixels”) 之一

      默认: “fraction”

      确定此颜色条的长度(即颜色变化方向的度量)是以绘图“分数”为单位还是以“像素”为单位设置。使用

      len

      设置值。
    • minexponent最小指数

      代码: fig.update_traces(marker_colorbar_minexponent=, selector=dict(type=‘scatter’))

      类型:大于或等于 0 的数字

      默认: 3

      如果 |n|,隐藏 10^n 的 SI 前缀 低于这个数字。这仅在

      tickformat

      为 “SI” 或 “B” 时有效。
    • nticks

      代码: fig.update_traces(marker_colorbar_nticks=, selector=dict(type=‘scatter’))

      类型:大于或等于 0 的整数

      默认值: 0

      指定特定轴的最大刻度数。实际的刻度数将被自动选择为小于或等于

      nticks

      。仅当

      tickmode

      设置为 “auto” 时才有效。
    • outlinecolor 轮廓颜色

      代码: fig.update_traces(marker_colorbar_outlinecolor=, selector=dict(type=‘scatter’))

      类型:颜色

      默认值: “#444”

      设置轴线颜色。

    • outlinewidth 轮廓宽度

      代码: fig.update_traces(marker_colorbar_outlinewidth=, selector=dict(type=‘scatter’))

      类型:大于或等于 0 的数字

      默认: 1

      设置轴线的宽度(以像素为单位)。

    • separatethousands 数以千计

      代码: fig.update_traces(marker_colorbar_separatethousands=, selector=dict(type=‘scatter’))

      类型:布尔型

      如果为“True”,即使是 4 位整数也被分隔

    • showexponent 显示指数

      代码: fig.update_traces(marker_colorbar_showexponent=, selector=dict(type=‘scatter’))

      类型:枚举,一个(“all”| “first”| “last”| “none”)

      默认: “all”

      如果为“all”,则显示除有效数之外的所有指数。如果为“first”,则仅显示第一个刻度的指数。如果为“last”,则仅显示最后一个刻度的指数。如果“无”,则不会出现指数。

    • showticklabels 显示标签

      代码: fig.update_traces(marker_colorbar_showticklabels=, selector=dict(type=‘scatter’))

      类型: boolean

      默认值: True

      确定是否绘制刻度标签。

    • showtickprefix 显示标记前缀

      代码: fig.update_traces(marker_colorbar_showtickprefix=, selector=dict(type=‘scatter’))

      类型:枚举,一个(“all”| “first”| “last”| “none”)

      默认: “all”

      如果为“all”,则所有刻度标签都带有前缀显示。如果为“first”,则仅显示第一个刻度并带有前缀。如果为“last”,则仅显示最后一个刻度并带有后缀。如果为“无”,则隐藏刻度前缀。

    • showticksuffix 演出后缀

      代码: fig.update_traces(marker_colorbar_showticksuffix=, selector=dict(type=‘scatter’))

      类型:枚举,一个(“all”| “first”| “last”| “none”)

      默认: “all”

      showtickprefix

      相同,但用于刻度后缀。
    • thickness 厚度

      代码: fig.update_traces(marker_colorbar_thickness=, selector=dict(type=‘scatter’))

      类型:大于或等于 0 的数字

      默认: 30

      设置颜色条的粗细 此度量不包括填充、刻度和标签的大小。

    • thicknessmode 厚度模式

      代码: fig.update_traces(marker_colorbar_thicknessmode=, selector=dict(type=‘scatter’))

      类型: enumerated , ( “fraction”| “pixels”) 之一

      默认: “pixels”

      确定此颜色条的厚度(即恒定颜色方向上的度量)是以绘图“分数”为单位还是以“像素”为单位设置。使用

      thickness

      设置值。
    • tick0

      代码: fig.update_traces(marker_colorbar_tick0=, selector=dict(type=‘scatter’))

      类型:数字或分类坐标字符串

      设置第一个刻度在此轴上的位置。与

      dtick

      一起使用。如果轴

      type

      是“log”,那么你必须记录你的起始刻度(例如将起始刻度设置为 100,将

      tick0

      设置为 2),除非

      dtick

      ="L "(有关更多信息,请参阅

      dtick

      )。如果轴

      type

      是“日期”,它应该是一个日期字符串,如日期数据。如果轴

      type

      是“类别”,它应该是一个数字,使用比例尺,其中每个类别按照出现的顺序从零开始分配一个序列号。
    • tickangle

      代码: fig.update_traces(marker_colorbar_tickangle=, selector=dict(type=‘scatter’))

      类型:角度

      默认值: “auto”

      设置刻度标签相对于水平线的角度。例如,-90 的

      tickangle

      垂直绘制刻度标签。
    • tickcolor

      代码: fig.update_traces(marker_colorbar_tickcolor=, selector=dict(type=‘scatter’))

      类型:颜色

      默认值: “#444”

      设置刻度颜色。

    • tickfont

      代码: fig.update_traces(marker_colorbar_tickfont=dict(…), selector=dict(type=‘scatter’))

      类型:包含下面列出的一个或多个键的字典。

      设置颜色条的刻度标签字体

      • color 颜色

        代码: fig.update_traces(marker_colorbar_tickfont_color=, selector=dict(type=‘scatter’))

        类型:颜色

      • family

        代码: fig.update_traces(marker_colorbar_tickfont_family=, selector=dict(type=‘scatter’))

        类型:字符串

        HTML 字体系列 - 将由网络浏览器应用的字体。网络浏览器只有在其运行的系统上可用时才能应用该字体。提供以逗号分隔的多个字体系列,以指示在系统上不可用时应用字体的首选项。Chart Studio Cloud(位于 https://chart-studio.plotly.com 或内部部署)在服务器上生成图像,其中仅安装和支持选定数量的字体。其中包括“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 尺寸

        代码: fig.update_traces(marker_colorbar_tickfont_size=, selector=dict(type=‘scatter’))

        类型:大于或等于 1 的数字

    • tickformat 打勾格式

      代码: fig.update_traces(marker_colorbar_tickformat=, selector=dict(type=‘scatter’))

      类型:字符串

      默认值: “”

      使用与 Python 非常相似的 d3 格式迷你语言设置刻度标签格式规则。有关数字,请参阅:https://github.com/d3/d3-format/tree/v1.4.5#d3-format。日期见:https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format。我们向 d3 的日期格式化程序添加了两项:“%h”表示半年的十进制数,以及“%{n}f”表示带有 n 位数字的小数秒。例如,带有刻度格式“%H%M%S.%2f”的“2016-10-13 09:15:23.456”将显示“091523.46”

    • tickformatstops

      代码: fig.update_traces(marker_colorbar_tickformatstops=list(…), selector=dict(type=‘scatter’))

      类型: dict 列表,其中每个 dict 具有下面列出的一个或多个键。

      • dtickrange

        父级: data[type=scatter].marker.colorbar.tickformatstops[]

        类型:列表

        range [“min”, “max”], 其中 “min”, “max” - 描述某些缩放级别的 dtick 值,可以通过传递 “null” 来省略 “min” 或 “max” 值

      • enabled 启用

        父级: data[type=scatter].marker.colorbar.tickformatstops[]

        类型: boolean

        默认值: True

        确定是否使用此停靠点。如果为“False”,则即使在其“dtickrange”范围内也会忽略此停靠点。

      • name 名称

        父级: data[type=scatter].marker.colorbar.tickformatstops[]

        类型:字符串

        在模板中使用时,除了图形在此数组中已有的任何项目之外,还会在输出图形中创建命名项。您可以修改输出图中的这些项目,方法是制作自己的项目,其中

        templateitemname

        与此

        name

        与您的修改相匹配(包括

        visible: False

        enabled: False

        以隐藏它)。在模板之外没有效果。
      • templateitemname 模板项目名称

        父级: data[type=scatter].marker.colorbar.tickformatstops[]

        类型:字符串

        用于在模板中引用此数组中的命名项。即使输入图中没有匹配的项目,模板中的命名项目也将被创建,但是您可以通过创建一个与“模板项目名称”匹配其“名称”的项目以及您的修改(包括“可见:假”或“启用”)来修改一个项目: False

        隐藏它)。如果没有模板或没有匹配的项目,该项目将被隐藏,除非您明确地使用

        visible: True` 显示它。
      • value

        父级: data[type=scatter].marker.colorbar.tickformatstops[]

        类型:字符串

        默认值: “”

        string - 描述缩放级别的 dtickformat,与“tickformat”相同

    • ticklabeloverflow 标签溢出

      代码: fig.update_traces(marker_colorbar_ticklabeloverflow=, selector=dict(type=‘scatter’))

      类型: enumerated , ( “allow”| “hide past div”| “hide past domain”) 之一

      确定我们如何处理会溢出图形 div 或轴域的刻度标签。内部刻度标签的默认值是“隐藏过去的域”。在其他情况下,默认值是“隐藏过去的 div”。

    • ticklabelposition 刻度标签位置

      代码: fig.update_traces(marker_colorbar_ticklabelposition=, selector=dict(type=‘scatter’))

      类型: enumerated , ( “outside”| “inside”| “outside top”| “inside top”| “outside bottom”| “inside bottom”) 之一

      默认: “outside”

      确定在何处绘制刻度标签。

    • ticklen

      代码: fig.update_traces(marker_colorbar_ticklen=, selector=dict(type=‘scatter’))

      类型:大于或等于 0 的数字

      默认: 5

      设置刻度长度(以像素为单位)。

    • tickmode

      代码: fig.update_traces(marker_colorbar_tickmode=, selector=dict(type=‘scatter’))

      类型: enumerated , ( “auto”| “linear”| “array”) 之一

      设置此轴的刻度模式。如果为“自动”,则通过

      nticks

      设置刻度数。如果是“线性”,则刻度的位置由起始位置

      tick0

      和刻度步骤

      dtick

      决定(如果提供了

      tick0

      dtick

      ,则“线性”是默认值)。如果是“array”,刻度的位置是通过

      tickvals

      设置的,刻度文本是

      ticktext

      。(如果提供了

      tickvals

      ,则“array”是默认值)。
    • tickprefix

      代码: fig.update_traces(marker_colorbar_tickprefix=, selector=dict(type=‘scatter’))

      类型:字符串

      默认值: “”

      设置刻度标签前缀。

    • ticks

      代码: fig.update_traces(marker_colorbar_ticks=, selector=dict(type=‘scatter’))

      类型:枚举,一个(“outside”| “inside”| “”)

      默认: “”

      确定是否绘制刻度。如果是“”,则不绘制此轴的刻度。如果是“outside”(“inside”),则此轴将绘制在轴线的外部(内部)。

    • ticksuffix

      代码: fig.update_traces(marker_colorbar_ticksuffix=, selector=dict(type=‘scatter’))

      类型:字符串

      默认值: “”

      设置刻度标签后缀。

    • ticktext

      代码: fig.update_traces(marker_colorbar_ticktext=, selector=dict(type=‘scatter’))

      类型:列表、numpy 数组或 Pandas 系列的数字、字符串或日期时间。

      通过

      tickvals

      设置在刻度位置显示的文本。仅当

      tickmode

      设置为“数组”时才有效。与

      tickvals

      一起使用。
    • tickvals 刻度值

      代码: fig.update_traces(marker_colorbar_tickvals=, selector=dict(type=‘scatter’))

      类型:列表、numpy 数组或 Pandas 系列的数字、字符串或日期时间。

      设置此轴上出现刻度的值。仅当

      tickmode

      设置为“数组”时才有效。与

      ticktext

      一起使用。
    • tickwidth 刻度宽度

      代码: fig.update_traces(marker_colorbar_tickwidth=, selector=dict(type=‘scatter’))

      类型:大于或等于 0 的数字

      默认: 1

      设置刻度宽度(以像素为单位)。

  • title 标题

    代码: fig.update_traces(marker_colorbar_title=dict(…), selector=dict(type=‘scatter’))

    类型:包含下面列出的一个或多个键的字典。

    • font 字体

      代码: fig.update_traces(marker_colorbar_title_font=dict(…), selector=dict(type=‘scatter’))

      类型:包含下面列出的一个或多个键的字典。

      设置此颜色条的标题字体。请注意,标题的字体曾经由现已弃用的

      titlefont

      属性设置。
      • color 颜色

        代码: fig.update_traces(marker_colorbar_title_font_color=, selector=dict(type=‘scatter’))

        类型:颜色

      • family

        代码: fig.update_traces(marker_colorbar_title_font_family=, selector=dict(type=‘scatter’))

        类型:字符串

        HTML 字体系列 - 将由网络浏览器应用的字体。网络浏览器只有在其运行的系统上可用时才能应用该字体。提供以逗号分隔的多个字体系列,以指示在系统上不可用时应用字体的首选项。Chart Studio Cloud(位于 https://chart-studio.plotly.com 或内部部署)在服务器上生成图像,其中仅安装和支持选定数量的字体。其中包括“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 尺寸

        代码: fig.update_traces(marker_colorbar_title_font_size=, selector=dict(type=‘scatter’))

        类型:大于或等于 1 的数字

      • side

        代码: fig.update_traces(marker_colorbar_title_side=, selector=dict(type=‘scatter’))

        类型:枚举,一个(“right”| “top”| “bottom”)

        默认: “top”

        确定颜色条标题相对于颜色条的位置。请注意,标题的位置曾经由现已弃用的

        titleside

        属性设置。
    • text 文本

      代码: fig.update_traces(marker_colorbar_title_text=, selector=dict(type=‘scatter’))

      类型:字符串

      设置颜色条的标题。请注意,在

      title.text

      存在之前,标题的内容曾经被定义为

      title

      属性本身。此行为已被弃用。
  • x

    代码: fig.update_traces(marker_colorbar_x=, selector=dict(type=‘scatter’))

    类型:介于或等于 -2 和 3 之间的数字

    默认值: 1.02

    设置颜色条的 x 位置(在绘图分数中)。

    • xanchor

      代码: fig.update_traces(marker_colorbar_xanchor=, selector=dict(type=‘scatter’))

      类型:枚举,一个(“left”| “center”| “right”)

      默认: “left”

      设置此颜色条的水平位置锚点。此锚点将

      x

      位置绑定到颜色条的“左侧”、“中心”或“右侧”。
    • xpad

      代码: fig.update_traces(marker_colorbar_xpad=, selector=dict(type=‘scatter’))

      类型:大于或等于 0 的数字

      默认: 10

      设置沿 x 方向的填充量(以 px 为单位)。

    • y

      代码: fig.update_traces(marker_colorbar_y=, selector=dict(type=‘scatter’))

      类型:介于或等于 -2 和 3 之间的数字

      默认值: 0.5

      设置颜色条的 y 位置(在绘图分数中)。

    • yanchor

      代码: fig.update_traces(marker_colorbar_yanchor=, selector=dict(type=‘scatter’))

      类型:枚举,一个(“top”| “middle”| “bottom”)

      默认: “middle”

      设置此颜色条的垂直位置锚点此锚点将

      y

      位置绑定到颜色条的“顶部”、“中间”或“底部”。
    • ypad

      代码: fig.update_traces(marker_colorbar_ypad=, selector=dict(type=‘scatter’))

      类型:大于或等于 0 的数字

      默认: 10

      设置沿 y 方向的填充量(以 px 为单位)。

  • colorscale 色阶

    代码: fig.update_traces(marker_colorscale=, selector=dict(type=‘scatter’))

    类型:色阶

    设置色阶。仅当在

    marker.color

    中设置为数值数组时才有效。colorscale 必须是一个数组,其中包含将标准化值映射到 rgb、rgba、hex、hsl、hsv 或命名颜色字符串的数组。至少,需要映射最低 (0) 和最高 (1) 值。例如,

    [[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]

    。要控制颜色空间中色阶的边界,请使用

    marker.cmin

    marker.cmax

    。或者,

    colorscale

    可以是以下列表的调色板名称字符串:Blackbody,Bluered,Blues,Cividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis,YlGnBu, YlOrRd。
  • gradient 坡度

    代码: fig.update_traces(marker_gradient=dict(…), selector=dict(type=‘scatter’))

    类型:包含下面列出的一个或多个键的字典。

    • color 颜色

      代码: fig.update_traces(marker_gradient_color=, selector=dict(type=‘scatter’))

      类型:颜色或颜色数组

      设置渐变填充的最终颜色:径向的中心颜色,水平的右侧或垂直的底部。

    • type 类型

      编码: fig.update_traces(marker_gradient_type=, selector=dict(type=‘scatter’))

      类型:枚举或enumerateds的阵列的一个(“radial”| “horizontal”| “vertical”| “none”)

      默认值: “none”

      设置用于填充标记的渐变类型

  • line线

    代码: fig.update_traces(marker_line=dict(…), selector=dict(type=‘scatter’))

    类型:包含下面列出的一个或多个键的字典。

    • autocolorscale 自动色标

      代码: fig.update_traces(marker_line_autocolorscale=, selector=dict(type=‘scatter’))

      类型: boolean

      默认值: True

      确定色阶是默认调色板(

      autocolorscale: True

      )还是由

      marker.line.colorscale

      确定的调色板。仅当在

      marker.line.color

      中设置为数值数组时才有效。如果未指定

      colorscale

      autocolorscale

      为 True,将根据

      color

      数组中的数字是全正、全负还是混合来选择默认调色板。
    • cauto

      代码: fig.update_traces(marker_line_cauto=, selector=dict(type=‘scatter’))

      类型: boolean

      默认值: True

      确定是否相对于输入数据(此处在

      marker.line.color

      中)或在

      marker.line.cmin

      marker.line.cmax

      中设置的边界计算颜色域 仅有效如果在

      marker.line.color

      中设置为数值数组。当

      marker.line.cmin

      marker.line.cmax

      由用户设置时,默认为

      False

    • cmax

      代码: fig.update_traces(marker_line_cmax=, selector=dict(type=‘scatter’))

      类型:编号

      设置色域的上限。仅当在

      marker.line.color

      中设置为数值数组时才有效。值应该与

      marker.line.color

      中的单位相同,如果设置,也必须设置

      marker.line.cmin

    • cmid

      代码: fig.update_traces(marker_line_cmid=, selector=dict(type=‘scatter’))

      类型:编号

      通过将

      marker.line.cmin

      和/或

      marker.line.cmax

      缩放为与该点等距来设置颜色域的中点。仅当在

      marker.line.color

      中设置为数值数组时才有效。值应该与

      marker.line.color

      中的单位相同。当

      marker.line.cauto

      False

      时无效。
    • cmin

      代码: fig.update_traces(marker_line_cmin=, selector=dict(type=‘scatter’))

      类型:编号

      设置色域的下限。仅当在

      marker.line.color

      中设置为数值数组时才有效。值应该与

      marker.line.color

      中的单位相同,如果设置,也必须设置

      marker.line.cmax

    • color 颜色

      代码: fig.update_traces(marker_line_color=, selector=dict(type=‘scatter’))

      类型:颜色或颜色数组

      设置 themarker.linecolor。它接受特定颜色或数字数组,这些数字映射到相对于数组的最大值和最小值或相对于

      marker.line.cmin

      marker.line.cmax

      (如果设置)的色阶。
    • coloraxis 色轴

      代码: fig.update_traces(marker_line_coloraxis=, selector=dict(type=‘scatter’))

      类型: subplotid

      设置对共享颜色轴的引用。这些共享色轴的引用是“coloraxis”、“coloraxis2”、“coloraxis3”等。这些共享色轴的设置在布局中设置,在

      layout.coloraxis

      layout.coloraxis2

      等下。注意多个色标可以链接到同一个色轴。
    • colorscale 色阶

      代码: fig.update_traces(marker_line_colorscale=, selector=dict(type=‘scatter’))

      类型:色阶

      设置色阶。仅当在

      marker.line.color

      中设置为数值数组时才有效。colorscale 必须是一个数组,其中包含将标准化值映射到 rgb、rgba、hex、hsl、hsv 或命名颜色字符串的数组。至少,需要映射最低 (0) 和最高 (1) 值。例如,

      [[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]

      。要控制颜色空间中色阶的边界,请使用

      marker.line.cmin

      marker.line.cmax

      。或者,

      colorscale

      可以是以下列表的调色板名称字符串:Blackbody,Bluered,Blues,Cividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis,YlGnBu, YlOrRd。
    • reversescale

      代码: fig.update_traces(marker_line_reversescale=, selector=dict(type=‘scatter’))

      类型:布尔型

      如果为 True,则反转颜色映射。仅当在

      marker.line.color

      中设置为数值数组时才有效。如果为 True,

      marker.line.cmin

      将对应数组中的最后一种颜色,而

      marker.line.cmax

      将对应于第一种颜色。
    • width 宽度

      代码: fig.update_traces(marker_line_width=, selector=dict(type=‘scatter’))

      类型:大于或等于 0 的数字或数字数组

      设置标记点边界线的宽度(以像素为单位)。

  • maxdisplayed 最大显示

    代码: fig.update_traces(marker_maxdisplayed=, selector=dict(type=‘scatter’))

    类型:大于或等于 0 的数字

    默认: 0

    设置要在图形上绘制的最大点数。“0”对应无限制。

  • opacity 不透明度

    代码: fig.update_traces(marker_opacity=, selector=dict(type=‘scatter’))

    类型:介于或等于 0 和 1 之间的数字或数字数组

    设置标记不透明度。

  • reversescale

    代码: fig.update_traces(marker_reversescale=, selector=dict(type=‘scatter’))

    类型:布尔型

    如果为 True,则反转颜色映射。仅当在

    marker.color

    中设置为数值数组时才有效。如果为 True,

    marker.cmin

    将对应数组中的最后一种颜色,而

    marker.cmax

    将对应于第一种颜色。
  • showscale

    代码: fig.update_traces(marker_showscale=, selector=dict(type=‘scatter’))

    类型:布尔型

    确定是否为此跟踪显示颜色条。仅当在

    marker.color

    中设置为数值数组时才有效。
  • size 尺寸

    代码: fig.update_traces(marker_size=, selector=dict(type=‘scatter’))

    类型:大于或等于 0 的数字或数字数组

    默认: 6

    设置标记大小(以像素为单位)。

  • sizemin 最小尺寸

    代码: fig.update_traces(marker_sizemin=, selector=dict(type=‘scatter’))

    类型:大于或等于 0 的数字

    默认: 0

    仅当

    marker.size

    设置为数值数组时才有效。设置渲染标记点的最小尺寸(以像素为单位)。
  • sizemode 大小模式

    代码: fig.update_traces(marker_sizemode=, selector=dict(type=‘scatter’))

    类型: enumerated , ( “diameter”| “area”) 之一

    默认: “diameter”

    仅当

    marker.size

    设置为数值数组时才有效。设置将“size”中的数据转换为像素的规则。
  • sizeref 尺寸参考

    代码: fig.update_traces(marker_sizeref=, selector=dict(type=‘scatter’))

    类型:数字

    默认值: 1

    仅当

    marker.size

    设置为数值数组时才有效。设置用于确定标记点的渲染大小的比例因子。与

    sizemin

    sizemode

    一起使用。
    • symbol

      编码: fig.update_traces(marker_symbol=, selector=dict(type=‘scatter’))

      类型:枚举或enumerateds的阵列的一个(“0”| “0”| “circle”| “100”| “100”| “circle-open”| “200”| “200”| “circle-dot”| “300”| “300”| “circle-open-dot”| “1”| “1”| “square”| “101”| “101”| “square-open”| “201”| “201”| “square-dot”| “301”| “301”| “square-open-dot”| “2”| “2”| “diamond”| “102”| “102”| “diamond-open”| “202”| “202”| “diamond-dot”| “302”| “302”| “diamond-open-dot”| “3”| “3”| “cross”| “103”| “103”| “cross-open”| “203”| “203”| “cross-dot”| “303”| “303”|“cross-open-dot”| “4”| “4”| “x”| “104”| “104”| “x-open”| “204”| “204”| “x-dot”| “304”| “304”| “x-open-dot”| “5”| “5”| “triangle-up”| “105”| “105”| “triangle-up-open”| “205”| “205”| “triangle-up-dot”| “305”| “305”| “triangle-up-open-dot”| “6”| “6”| “triangle-down”| “106”| “106”| “triangle-down-open”| “206”| “206”| “triangle-down-dot”| “306”| “306”| “triangle-down-open-dot”| “7”| “7”| “triangle-left”| “107”| “107”| “triangle-left-open”| “207”| “207”| “triangle-left-dot”| “307”| “307”| “triangle-left-open-dot”| “8”| “8”| “triangle-right”| “108”|“108”| “triangle-right-open”| “208”| “208”| “triangle-right-dot”| “308”| “308”| “triangle-right-open-dot”| “9”| “9”| “triangle-ne”| “109”| “109”| “triangle-ne-open”| “209”| “209”| “triangle-ne-dot”| “309”| “309”| “triangle-ne-open-dot”| “10”| “10”| “triangle-se”| “110”| “110”| “triangle-se-open”| “210”| “210”| “triangle-se-dot”| “310”| “310”| “triangle-se-open-dot”| “11”| “11”| “triangle-sw”| “111”| “111”| “triangle-sw-open”| “211”| “211”| “triangle-sw-dot”| “311”| “311”| “triangle-sw-open-dot”| “12”| “12”| “triangle-nw”| “112”| “112”| “triangle-nw-open”| “212”| “212”| “triangle-nw-dot”|“312”| “312”| “triangle-nw-open-dot”| “13”| “13”| “pentagon”| “113”| “113”| “pentagon-open”| “213”| “213”| “pentagon-dot”| “313”| “313”| “pentagon-open-dot”| “14”| “14”| “hexagon”| “114”| “114”| “hexagon-open”| “214”| “214”| “hexagon-dot”| “314”| “314”| “hexagon-open-dot”| “15”| “15”| “hexagon2”| “115”| “115”| “hexagon2-open”| “215”| “215”| “hexagon2-dot”| “315”| “315”| “hexagon2-open-dot”| “16”| “16”| “octagon”| “116”| “116”| “octagon-open”| “216”| “216”| “octagon-dot”| “316”| “316”| “octagon-open-dot”| “17”| “17”|“star”| “117”| “117”| “star-open”| “217”| “217”| “star-dot”| “317”| “317”| “star-open-dot”| “18”| “18”| “hexagram”| “118”| “118”| “hexagram-open”| “218”| “218”| “hexagram-dot”| “318”| “318”| “hexagram-open-dot”| “19”| “19”| “star-triangle-up”| “119”| “119”| “star-triangle-up-open”| “219”| “219”| “star-triangle-up-dot”| “319”| “319”| “star-triangle-up-open-dot”| “20”| “20”| “star-triangle-down”| “120”| “120”| “star-triangle-down-open”| “220”| “220”| “star-triangle-down-dot”| “320”| “320”| “star-triangle-down-open-dot”| “21”| “21”| “star-square”| “121”| “121”| “star-square-open”| “221”|“221”| “star-square-dot”| “321”| “321”| “star-square-open-dot”| “22”| “22”| “star-diamond”| “122”| “122”| “star-diamond-open”| “222”| “222”| “star-diamond-dot”| “322”| “322”| “star-diamond-open-dot”| “23”| “23”| “diamond-tall”| “123”| “123”| “diamond-tall-open”| “223”| “223”| “diamond-tall-dot”| “323”| “323”| “diamond-tall-open-dot”| “24”| “24”| “diamond-wide”| “124”| “124”| “diamond-wide-open”| “224”| “224”| “diamond-wide-dot”| “324”| “324”| “diamond-wide-open-dot”| “25”| “25”| “hourglass”| “125”| “125”| “hourglass-open”| “26”| “26”| “bowtie”| “126”| “126”| “bowtie-open”|“27”| “27”| “circle-cross”| “127”| “127”| “circle-cross-open”| “28”| “28”| “circle-x”| “128”| “128”| “circle-x-open”| “29”| “29”| “square-cross”| “129”| “129”| “square-cross-open”| “30”| “30”| “square-x”| “130”| “130”| “square-x-open”| “31”| “31”| “diamond-cross”| “131”| “131”| “diamond-cross-open”| “32”| “32”| “diamond-x”| “132”| “132”| “diamond-x-open”| “33”| “33”| “cross-thin”| “133”| “133”| “cross-thin-open”| “34”| “34”| “x-thin”| “134”| “134”| “x-thin-open”| “35”| “35”| “asterisk”| “135”| “135”|“asterisk-open”| “36”| “36”| “hash”| “136”| “136”| “hash-open”| “236”| “236”| “hash-dot”| “336”| “336”| “hash-open-dot”| “37”| “37”| “y-up”| “137”| “137”| “y-up-open”| “38”| “38”| “y-down”| “138”| “138”| “y-down-open”| “39”| “39”| “y-left”| “139”| “139”| “y-left-open”| “40”| “40”| “y-right”| “140”| “140”| “y-right-open”| “41”| “41”| “line-ew”| “141”| “141”| “line-ew-open”| “42”| “42”| “line-ns”| “142”| “142”| “line-ns-open”| “43”| “43”| “line-ne”| “143”|“143”| “line-ne-open”| “44”| “44”| “line-nw”| “144”| “144”| “line-nw-open”| “45”| “45”| “arrow-up”| “145”| “145”| “arrow-up-open”| “46”| “46”| “arrow-down”| “146”| “146”| “arrow-down-open”| “47”| “47”| “arrow-left”| “147”| “147”| “arrow-left-open”| “48”| “48”| “arrow-right”| “148”| “148”| “arrow-right-open”| “49”| “49”| “arrow-bar-up”| “149”| “149”| “arrow-bar-up-open”| “50”| “50”| “arrow-bar-down”| “150”| “150”| “arrow-bar-down-open”| “51”| “51”| “arrow-bar-left”| “151”| “151”| “arrow-bar-left-open”| “52”| “52”| “arrow-bar-right”|“152”| “152”| “arrow-bar-right-open”)

      默认值: “circle”

      设置标记符号类型。添加 100 相当于将“-open”附加到符号名称。添加 200 相当于将“-dot”附加到符号名称。添加 300 相当于将“-open-dot”或“dot-open”附加到符号名称。