I have a tikzpicture
generated in Python using tikzplotlib:
import numpy as np
import matplotlib.pyplot as plt
import tikzplotlib
vector = np.array([1, 2, 3])
plt.figure(figsize=(6, 4))
plt.plot(vector, vector)
tikzplotlib.save('test.tex')
Now if I change the figsize
in Python, the image size in my Python environment will indeed change. But in a LaTeX document, where I import the tikzpicture
using \input{test.tex}
, the size is not changed. How can I define the size in either Python or LaTeX, without stretching the text/numbers as well, that should remain the standard size of the LaTeX text? The solutions mentioned in this question do not solve my problem.
matplotlib2tikz
: github.com/nschloe/matplotlib2tikz (just scroll down a bit)matplotlib2tikz
and nottikzplotlib
.