So, I have several data set samples taken at different times. For each sample, I want to build a scattering matrix, and each scattering matrix should have a sampling time as a name.
The problem is the lack of an argument "title" for pandas.tools.plotting.scatter_matrix
When I try to print () the title before the graphic, it will print all the titles before the graphic.
for qid in qids:
date = db[collection].find_one({ "querySummary.qid": qid }, {"querySummary.date":1})["querySummary"]["date"].isoformat()
print(date)
cursor = db[collection].find({ "querySummary.qid": qid })
cols = ["resultNum", "col2", "col3", "col4"]
rows = []
for result in cursor:
rows.append([result["resultNum"], result["col2"], result["col3"], result["col4"]])
df = pd.DataFrame(rows, columns=cols);
scatter_matrix(df, alpha=0.3, figsize=(16,16), diagonal='kde', marker=date)
By running the code, all the headers will be printed before the first scattering matrix is finally drawn:

Any ideas?
source
share