import csv
a = csv.reader(open(DATA+'DataA.csv'))
for row in a:
time = row[1]
conversion = row[3]
x_series = time
y_series = conversion
scatter_plot(zip(x_series,y_series))
I am attempting to create a scatter plot in Sage Notebook. I’m reading in the data in DataA.csv specifically rows 1 and 3. I want to create a scatter plot based on those pieces of data. Everything works except that a new scatter plot is created for each individual tuple instead of having all of them on one scatter plot.
Any ideas of how I can fix this. Thanks in advance
You might want to try this.
I don’t have your data (or any data, actually) so I can’t test it, but this should work fine. In Sage one adds plots, and then they show up as the default representation when
Gis given. You could ask the different scatter plots to have different colors, too…Also, I prefer to use point or perhaps
list_plotfor this, but I guess it’s a matter of preference.