I don't manage to avoid the scientific notation nor the thousand separators in the axises. Seems like tikzplotlib forces some settings that overwrite the global settings in the latex preamble. We should either be able to pass these variables in python in the save method or they should take after the global settings in the latex document.
here is my Python code:
# plot the lines into one graph
sns.lineplot(x='year', y='c_pop30', data=c_t_pop30, ci=None)
sns.lineplot(x='year', y='t_pop30', data=c_t_pop30, ci=None)
plt.legend(labels=['control', 'treatment'], facecolor='white')
plt.ylabel('Population')
plt.xlabel('Year')
# add vertical lines
plt.axvline(1949)
plt.axvline(1990)
plt.ticklabel_format(useOffset=False, style='plain')
# export to latex
tikzplotlib.save(r"/Users/alexgunsberg/Library/Mobile Documents/com~apple~CloudDocs/Hanken/Courses/Urban Economics/problem_set/manuscript/src/figs/fig3c.tex")
and this is how it looks in python:
this is how it turns out in latex:
here's the latex the code that was saved by tikzplotlib
I don't manage to avoid the scientific notation nor the thousand separators in the axises. Seems like tikzplotlib forces some settings that overwrite the global settings in the latex preamble. We should either be able to pass these variables in python in the save method or they should take after the global settings in the latex document.
here is my Python code:
and this is how it looks in python:
this is how it turns out in latex:
here's the latex the code that was saved by tikzplotlib