TeX - LaTeX Asked on June 24, 2021
I created an easy 3D figure in Python using this code:
import numpy as np
import matplotlib.pyplot as plt
import tikzplotlib
XX = np.array([0,1,2])
YY = np.array([0,1,2])
XX, YY = np.meshgrid(XX, YY)
ZZ = np.sqrt(XX**2 + YY**2)
plt.figure(10)
ax = plt.axes(projection='3d')
ax.plot_surface(XX, YY, ZZ)
plt.show()
tikzplotlib.clean_figure()
tikzplotlib.save("myfig.tex")
Then, I imported the file in a document like this :
documentclass{report}
usepackage{tikz}
usepackage{pgfplots}
begin{document}
Hello
input{myfig.tex}
Where is my figure?
end{document}
The result is a very tiny figure :
I tried adding height=5cm, width=5cm,
in the myfig.tex
file, but this does not help.
I do not understand where the problem could lie…
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP