add markers
This commit is contained in:
@@ -15,16 +15,16 @@ def plot(data, countries):
|
|||||||
time, new_cases, new_deaths, total_cases, total_deaths = data[loc]
|
time, new_cases, new_deaths, total_cases, total_deaths = data[loc]
|
||||||
|
|
||||||
# total cases
|
# total cases
|
||||||
tc.plot(time, total_cases, label=f"{loc}")
|
tc.plot(time, total_cases, label=f"{loc}", marker=".")
|
||||||
|
|
||||||
# total deaths
|
# total deaths
|
||||||
td.plot(time, total_deaths, label=f"{loc}")
|
td.plot(time, total_deaths, label=f"{loc}", marker=".")
|
||||||
|
|
||||||
# new cases
|
# new cases
|
||||||
nc.plot(time, new_cases, label=f"{loc}")
|
nc.plot(time, new_cases, label=f"{loc}", marker=".")
|
||||||
|
|
||||||
# new deaths
|
# new deaths
|
||||||
nd.plot(time, new_deaths, label=f"{loc}")
|
nd.plot(time, new_deaths, label=f"{loc}", marker=".")
|
||||||
|
|
||||||
for ax, fig, name in [(tc, tcp, "total_cases"), (td, tdp, "total_deaths"), (nc, ncp, "new_cases"), (nd, ndp, "new_deaths")]:
|
for ax, fig, name in [(tc, tcp, "total_cases"), (td, tdp, "total_deaths"), (nc, ncp, "new_cases"), (nd, ndp, "new_deaths")]:
|
||||||
ax.set_yscale("log")
|
ax.set_yscale("log")
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ def plot(data, countries):
|
|||||||
|
|
||||||
# death/case
|
# death/case
|
||||||
pp.figure(name)
|
pp.figure(name)
|
||||||
pp.plot(time, np.array(total_deaths)/np.array(total_cases), label=f"{loc}")
|
pp.plot(time, np.array(total_deaths)/np.array(total_cases), label=f"{loc}", marker=".")
|
||||||
|
|
||||||
pp.yscale("log")
|
pp.yscale("log")
|
||||||
pp.xticks(rotation=90)
|
pp.xticks(rotation=45)
|
||||||
pp.legend(frameon=False)
|
pp.legend(frameon=False)
|
||||||
pp.tight_layout()
|
pp.tight_layout()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user