I know the general usage of plotfile:

import matplotlib.pyplot as plt

plt.plotfile(csvfile,sometuple)

But this produces a line plot by default. I want a scatterplot. Is there some special argument that i need to pass to this method? I have already looked into the documentation and didnt find anything.

有帮助吗?

解决方案

I don't see the advantages of plotfile, myself: as soon as you want to do anything interesting it's probably easier to work with the usual directives. But

matplotlib.pyplot.plotfile('dat.csv',(0,1),linestyle="",marker="o")

should replace the line by points.

其他提示

I don't know how to use the plotfile command, but in the 'just' plot I've used markers like

matplotlib.pyplot.plot(X1, Y1, 'go', X2, Y2, 'b-') 

where 'go' means green circles for the first plots, 'b-' means blue lines for the second plot, 'r--' means red dashed lines, and so on...

Check out the matplotlib.pyplot.plot documentation.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top