scatterplot instead of a lineplot while using the plotfile function of matplotlib

Viewed 28800

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.

3 Answers

Plotfile is now deprecated, but for people reading this trying to make a scatter plot in regular matplotlib, it's easily done with .scatter. See the docs here.

In your code, try adding this, though you'll need to make sure csvfile and sometuple have the same dimensions.

plt.scatter(csvfile, sometuple)
Related