如何使用pandas.plot()更改标记大小 [英] How to change marker size with pandas.plot()
本文介绍了如何使用pandas.plot()更改标记大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个从df.plot(style="o")
创建的图表,其中o
标记太大.可以缩小尺寸吗?
I have a chart created from df.plot(style="o")
where the o
markers are too big. Would it be possible to size them down?
import pandas as pd
df = pd.DataFrame(range(1, 10))
df.plot(style="o")
如何缩小它们?
推荐答案
经过调查,看来您可以将ms
的缩写(也可以使用)传递给ms
(也可以使用)参数直接传递给pandas.plot()
:
After investigation, it looks like that you can pass the ms
, short for markersize
(which also work) argument directly to pandas.plot()
such has:
import pandas as pd
df = pd.DataFrame(range(1, 10))
df.plot(style="o", ms=3)
这篇关于如何使用pandas.plot()更改标记大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文