gpt4 book ai didi

python - Python Plotly 中的默认字体是什么?

转载 作者:行者123 更新时间:2023-12-04 03:24:34 27 4
gpt4 key购买 nike

例如,对于这样一个用基本绘图代码制作的图形
enter image description here
这里使用的字体是什么?

最佳答案

默认字体系列规范是 "Open Sans", verdana, arial, sans-serif ,如 Python Figure Reference: layout 中所列来自 Plotly 文档。选择的精确字体取决于您在系统上安装的字体。如果 Open Sans 可用,则将选择该字体。如果您没有 Open Sans,Plotly 将尝试使用 Verdana,如果没有,则使用 Arial。如果这些系列中没有任何字体可用,Plotly 将默认使用系统上可用的任何无衬线字体。
仅基于小写字母的形状 a在您发布的图的标题中,您的图似乎是使用 Open Sans 呈现的。 .
下面引用了 Pyplot 文档中的相关段落( 重点 我的)。

font

Code: fig.update_layout(font=dict(...))
Type: dict containing one or more of the keys listed below.

Sets the global font. Note that fonts used in traces and other layout components inherit from the global font.

family

Code: fig.update_layout(font_family=<VALUE>)
Type: string
Default: ""Open Sans", verdana, arial, sans-serif"

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.

关于python - Python Plotly 中的默认字体是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67844335/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com