Pandas: represent x-y plots with points instead of lines

Created on 30 Jul 2012  路  1Comment  路  Source: pandas-dev/pandas

This is a followup question to issue 1527 (https://github.com/pydata/pandas/issues/1527) which dealt with the ability to plot two column values against one another - which was added to pandas 0.8.1

Is there a way that each x-y position can be represented as points rather than as a line? For example the following will generate a squiggly line where points would be more useful:

from pandas import DataFrame
df = DataFrame(np.random.randn(100, 2), columns=['a', 'b']
df.plot(x='a',y='b')

thanks,
zach cp

Most helpful comment

df.plot(x='a', y='b', style='o')

>All comments

df.plot(x='a', y='b', style='o')

Was this page helpful?
0 / 5 - 0 ratings