声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/41107232/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。
显示中英文How to change marker size with pandas.plot()
pythonpandasmatplotlib
提问by Steven G
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?
我从标记太大的df.plot(style="o")
地方创建了一个图表o
。是否有可能缩小它们的尺寸?
import pandas as pd
df = pd.DataFrame(range(1, 10))
df.plot(style="o")


How can I shrink them down?
我怎样才能缩小它们?
回答by Steven G
After investigation, it looks like that you can pass the ms
, short for markersize
(which also work) argument directly to pandas.plot()
such has:
经过调查,您似乎可以将ms
, 缩写markersize
(也可以工作)参数直接传递给pandas.plot()
以下对象:
import pandas as pd
df = pd.DataFrame(range(1, 10))
df.plot(style="o", ms=3)

