[英]Scale an axis to scientific notation in Altair
您需要设置的一个选项是使用d3 格式format
的格式:
alt.Chart(df).mark_area().encode(
x=alt.X("date:T"),
y=alt.Y("time:Q", axis=alt.Axis(tickCount=10, format=".1e"),
color="type"
)
".1e"
中e
之前的数字描述了要显示的位数:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.