Moved legend to the right side, added citation

This commit is contained in:
Heiko J Schick
2021-11-21 19:14:31 +01:00
parent f919fdf627
commit 8726c438f0
+15 -1
View File
@@ -47,6 +47,7 @@ plt.rcParams["figure.figsize"] = (16,9)
plt.rcParams["lines.markersize"] = 8
plt.yscale('log')
plt.grid(True)
plt.subplots_adjust(right = 0.8)
x = df_transistors.year
y = df_transistors.transistors
@@ -74,7 +75,20 @@ plt.legend(["Transistors (thousands)",
"Typical power (Watts)",
"Number of logical cores"],
loc = "upper left",
bbox_to_anchor=(1.0, 1.0),
fontsize = "medium")
plt.text(100, 100, "This is a text")
plt.text(0.805, 0.155,
"Original data up to the year 2010 collected and plotted by\nM. Horowitz, F. Labonte, O. Shacham, K. Olukotun, \nL. Hammond, and C. Batten.",
fontsize = "x-small",
transform=plt.gcf().transFigure)
plt.text(0.805, 0.125,
"New plot and data collected for 2010-2017 by K. Rupp.",
fontsize = "x-small",
transform=plt.gcf().transFigure)
plt.savefig("data_visualisation.png", dpi = 300, orientation = "landscape", papertype ="a4")
plt.show()
plt.show()