Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pandas DataFrame plot marker

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='.'

like image 823
Keith Avatar asked May 06 '15 08:05

Keith


People also ask

How do I label axis in pandas?

You can set the labels on that object. Or, more succinctly: ax. set(xlabel="x label", ylabel="y label") . Alternatively, the index x-axis label is automatically set to the Index name, if it has one.


1 Answers

df.plot passes extra keyword parameters along to the underlying matplotlib plotting function. Thus,

df = pd.DataFrame({'x':np.arange(10), 'y':np.random.randn(10), 
                   'err':np.random.randn(10)})
df.plot('x', 'y', yerr='err', fmt='.')

yields

enter image description here

like image 178
unutbu Avatar answered Sep 25 '22 06:09

unutbu