Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 1932
Kernel: Python 2 (SageMath)
import numpy as np import matplotlib.pyplot as plt %matplotlib inline def f(t): return np.exp(-t) * np.cos(2*np.pi*t) t1 = np.arange(0.0, 5.0, 0.1) t2 = np.arange(0.0, 5.0, 0.02) fig = plt.figure(); fig, ax = plt.subplots(); ax.plot(t1, f(t1), 'bo', t2, f(t2), 'k');
<matplotlib.figure.Figure at 0x7f952806db50>
Image in a Jupyter notebook
from matplotlib2tikz import save as tikz_save
tikz_save('graf.tikz', figure=fig)
file encoding: None ========================================================= Please add the following line to your LaTeX preamble: \usepackage{pgfplots} \usepgfplotslibrary{plotmarks} =========================================================