Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top