繁体   English   中英

修改y轴(对数刻度)以显示更多值

[英]seaborn modify y axis (log scale) to show more values

我已经使用seaborn绘制了箱线图,y轴使用了对数刻度(时间以毫秒为单位)。 我想通过在轴上包含更多值来使y轴更清晰。 我该如何实现? 使用的代码和生成的图形如下。

ax2 = sns.boxplot(x="xVals", y="Time", data=df2, whis=[0, 100])
ax2.set(yscale="log")

在此处输入图片说明

尝试

ax2.xaxis.set_major_locator(ticker.MultipleLocator(5))
ax2.xaxis.set_minor_locator(ticker.MultipleLocator(1))

更多信息:

https://matplotlib.org/api/ticker_api.html

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM