根据在 python 中使用plotly方法在y轴刻度中添加货币符号的答案,您可以通过以下方式将货币添加到Python Plotly刻度格式化程序:
fig.update_layout(yaxis_tickprefix = '$', yaxis_tickformat = ',.')
但是,这显示负数而$-100不是-$100。
$-100
-$100
如何格式化刻度以包含 $ 并尊重负数?
python plotly plotly-python
plotly ×1
plotly-python ×1
python ×1