From dc7c2e1264b43071199b618ac985bbc69a4a3525 Mon Sep 17 00:00:00 2001 From: fordprefect Date: Sat, 21 Mar 2020 21:00:31 +0100 Subject: [PATCH] add markers --- basics.py | 8 ++++---- death_per_case.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/basics.py b/basics.py index 765cc60..cb5cbcd 100644 --- a/basics.py +++ b/basics.py @@ -15,16 +15,16 @@ def plot(data, countries): time, new_cases, new_deaths, total_cases, total_deaths = data[loc] # total cases - tc.plot(time, total_cases, label=f"{loc}") + tc.plot(time, total_cases, label=f"{loc}", marker=".") # total deaths - td.plot(time, total_deaths, label=f"{loc}") + td.plot(time, total_deaths, label=f"{loc}", marker=".") # new cases - nc.plot(time, new_cases, label=f"{loc}") + nc.plot(time, new_cases, label=f"{loc}", marker=".") # 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")]: ax.set_yscale("log") diff --git a/death_per_case.py b/death_per_case.py index 3c2a52f..a580580 100644 --- a/death_per_case.py +++ b/death_per_case.py @@ -13,10 +13,10 @@ def plot(data, countries): # death/case 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.xticks(rotation=90) + pp.xticks(rotation=45) pp.legend(frameon=False) pp.tight_layout()