[735bb5]: / doc / figures / introduction / pubmed_timeline.py

Download this file

21 lines (17 with data), 419 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# %%
import matplotlib.pyplot as plt
import pandas as pd
# %%
data = pd.read_csv("./data/PubMed_Timeline_Results_by_Year.csv")
data.head()
# %%
year = data["Year"].tolist()
count = data["Count"].tolist()
year[1]
# %%
plt.plot(year[2:], count[2:])
plt.xlabel("Year")
plt.ylabel("Number of publications")
plt.xticks(list(range(1781, 2022, 30)))
plt.ticklabel_format(style="sci", axis="y", scilimits=(0, 0))
plt.show()