Is there a way to set the marker style in pandas.DataFrame.plot? All other options are available by setting the kind. I would like a marker with error bar but just get a line with an error bar. If I was to do this through the function errorbar I would set fmt='.'
2 Answers
The OP does not specify it, but it depends whether you're trying to plot the Dataframe, or a series.
Plotting DataFrame
Reusing the example by @unutbu:
from numpy import arange, random
import pandas as pd
df = pd.DataFrame({'x': arange(10), 'y': random.randn(10), 'err': random.randn(10)})
df.plot('x', 'y', yerr='err', fmt='.')
Plotting Series in DataFrame
This time it's a bit different:
df.y.plot(fmt='.')
AttributeError: Unknown property fmt
you need:
df.y.plot(style='.')
DataFrame behavior with style
If you pass style to DataFrame.plot, "nothing happens":
df.plot('x', 'y', yerr='err', style='.')
which may be not what you want.



df.plot(style='.')what you were after?