summaryrefslogtreecommitdiffstats
path: root/python/mozperftest/mozperftest/metrics/notebook/notebook-sections/scatterplot
diff options
context:
space:
mode:
Diffstat (limited to 'python/mozperftest/mozperftest/metrics/notebook/notebook-sections/scatterplot')
-rw-r--r--python/mozperftest/mozperftest/metrics/notebook/notebook-sections/scatterplot15
1 files changed, 15 insertions, 0 deletions
diff --git a/python/mozperftest/mozperftest/metrics/notebook/notebook-sections/scatterplot b/python/mozperftest/mozperftest/metrics/notebook/notebook-sections/scatterplot
new file mode 100644
index 0000000000..f68b540236
--- /dev/null
+++ b/python/mozperftest/mozperftest/metrics/notebook/notebook-sections/scatterplot
@@ -0,0 +1,15 @@
+%% py
+from js import data_object
+import matplotlib.pyplot as plt
+
+plt.figure()
+
+for element in data_object:
+ data_array = element["data"]
+ x = [x["xaxis"] for x in data_array]
+ y = [x["value"] for x in data_array]
+ label = element["name"]+"\n"+element["subtest"]
+ plt.scatter(x,y,label=label)
+
+plt.legend()
+plt.show()