fix new cases axis upper bounds for spikey data, improved landing page comment
This commit is contained in:
@@ -8,6 +8,15 @@ import time as time_module
|
||||
import pickle
|
||||
basename="all_"
|
||||
|
||||
# manual y adjustments for new cases
|
||||
corr = {"Chile": 10000,
|
||||
"China": 4000,
|
||||
"Ecuador": 2500,
|
||||
"Kazakhstan": 5000,
|
||||
"Kyrgyztan": 2200,
|
||||
"Peru": 10000,
|
||||
}
|
||||
|
||||
def plot(data, countries, pop):
|
||||
figsize = (10,5)
|
||||
|
||||
@@ -30,6 +39,9 @@ def plot(data, countries, pop):
|
||||
# fix lower bound of plot
|
||||
for ax in (ax1, ax2):
|
||||
axis = ax.axis()
|
||||
if ax is ax1: # adjust left (new cases) axes upper boundary for given countries
|
||||
if loc in corr:
|
||||
axis = [axis[0], axis[1], axis[2], corr[loc]]
|
||||
ax.axis([axis[0], axis[1], -1, axis[3]])
|
||||
|
||||
# if we know population: plot 500 new cases / 1million inhabitants as a rough measure for comparison
|
||||
|
||||
Reference in New Issue
Block a user