<jupyter_start><jupyter_text>Total cumulative numbersThe first graph returned by the `overview` function (see the [overview](tutorial-overview-graphs.nbdata.html)and the explanation of the [observables](tutorial-observables.nbdata.html))shows the cumulative numbers for COVID cases and deaths. Here we show how it is created internally. Firstly, we import the plotting framework and some special functions:<jupyter_code>import matplotlib.pyplot as plt
from matplotlib.ticker import ScalarFormatter, FuncFormatter, FixedLocator
from matplotlib.dates import DateFormatter, MONDAY, WeekdayLocator<jupyter_output><empty_output><jupyter_text>We will need an empty Matplotlib graph object to pass onto the plotting functions.<jupyter_code>fig1, ax1 = plt.subplots();<jupyter_output><empty_output><jupyter_text>Now let's add some data to our empty graph<jupyter_code>country = "Iran"
weeks = 30
cases, deaths = ov.get_country_data(country)<jupyter_output><empty_output><jupyter_text>Now we populate the empty plot we have with the data. We call the ploting function twice with two different series of data:<jupyter_code>ov.plot_time_step(ax=ax1, series=cases)   # add cases to the graph
ov.plot_time_step(ax=ax1, series=deaths)  # add deaths to the graph
ax1.set_title("Total numbers, log scale")
ax1.legend()
ax1
fig1<jupyter_output><empty_output><jupyter_text>Additionaly, one may turn off the logarithmic scale with `logscale=False` and pick another line style:<jupyter_code>fig2, ax2 = plt.subplots();
ov.plot_time_step(ax=ax2, series=cases, style='*', logscale=False)   # add cases to the graph
ov.plot_time_step(ax=ax2, series=deaths, style='--', logscale=False)  # add deaths to the graph
ax2.set_title("Total numbers, linear scale")
ax2.legend();<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09229037703995498, 'fraction_numerical': 0.009003939223410242, 'mean_word_length': 7.42654028436019, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '200326', 'license': 'CC-BY-4.0', 'n_tokens_mistral': 588, 'n_tokens_neox': 561, 'n_words': 169, 'path': 'ipynb/tutorial-overview-plot_time_step.ipynb', 'repo_name': 'skirienko/oscovida.github.io', 'size': '1777'}