Add tornado plot to a LaTeX file

main
parent 5ac82fe776
commit f867bc70fa

Binary file not shown.

@ -0,0 +1,17 @@
\documentclass{article}
\usepackage{geometry}
\geometry{a5paper, portrait}
\usepackage{pgf}
\begin{document}
\begin{figure}[ht]
\centering
\includegraphics{tornado_plot.pdf}
\caption{Tornado plot}
\end{figure}
\end{document}

Binary file not shown.

File diff suppressed because it is too large Load Diff

@ -3,13 +3,22 @@
import pandas as pd import pandas as pd
import requests import requests
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
from matplotlib import rc import matplotlib
import json import json
from scipy import interpolate from scipy import interpolate
import numpy as np import numpy as np
# %% Use LaTeX # %% Use LaTeX, XXX might not need this
rc('text', usetex=True) plt.rc('text', usetex=True)
plt.rc('font', family='serif')
# matplotlib.use("pgf")
# matplotlib.rcParams.update({
# "pgf.texsystem": "pdflatex",
# 'font.family': 'serif',
# 'text.usetex': True,
# 'pgf.rcfonts': False,
# })
# %% Function to convert sizes in cm for figure size # %% Function to convert sizes in cm for figure size
def cm2inch(*tupl): def cm2inch(*tupl):
@ -55,7 +64,11 @@ ax.plot(df['death_change'], df['daily_deaths_avg'], lw=1)
ax.axvline(x=0, c='black', lw=1, ls=':') ax.axvline(x=0, c='black', lw=1, ls=':')
ax.spines['top'].set_visible(False) ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False) ax.spines['right'].set_visible(False)
plt.show()
plt.savefig('tornado_plot.pdf')
# %%
#df.plot(x='death_change', y='daily_deaths_avg')
#%% #%%
#df.plot() #df.plot()
Loading…
Cancel
Save