tikzplotlib
tikzplotlib copied to clipboard
:bar_chart: Save matplotlib figures as TikZ/PGFplots for smooth integration into LaTeX.
the error on most recent matplotlib version is the following: ```bash AttributeError: 'Line2D' object has no attribute '_us_dashSeq' ```
Exporting a dashed line ```python import tikzplotlib import matplotlib.pyplot as plt plt.figure() plt.plot([0, 1], [0, 1], 'k--') tikzplotlib.get_tikz_code() ``` results in an error: ``` AttributeError: 'Line2D' object has no attribute...
Hi, Thanks for developing such a great tool! I experienced a bug today, which is easy to fix. In _legend.py, line 81 and 82, `obj._ncol` should be `obj._ncols`. Then the...
in _legend.py ``` if obj._ncol != 1: data["current axes"].axis_options.append(f"legend columns={obj._ncol}") ``` leads to AttributeError: 'Legend' object has no attribute '_ncol' Fix: replace with _ncols
I noticed a bug in `_remove_NaNs`. the faulty code: ```python id_nan = np.any(np.isnan(data), axis=1) (....) id_first = np.argwhere(np.logical_not(id_nan))[0] ``` I have a plot where data is `array([[nan, nan]], dtype=float32)`, which...
Possible typo: `_ncol` instead of `n_cols`. With `_ncol` calling `tikzplotlib.save()` on a plot containing legends results in the error: ``` Traceback (most recent call last): File "/home/marvin/phd_scripts/2023_04_14 picoscope/analyzepicoscope_class.py", line 36,...
import matplotlib.pyplot as plt import numpy as np plt.style.use("ggplot") t = np.arange(0.0, 2.0, 0.1) s = np.sin(2 * np.pi * t) s2 = np.cos(2 * np.pi * t) plt.plot(t, s,...
```python import matplotlib.pyplot as plt import tikzplotlib plt.xlim(0, 1) plt.plot([5, 6], [2, 3]) tikzplotlib.clean_figure() ``` Error: ``` IndexError: index 0 is out of bounds for axis 0 with size 0...
```python import matplotlib.pyplot as plt import tikzplotlib plt.scatter([-2], [3]) tikzplotlib.clean_figure() ``` Error: ```python ValueError: all the input arrays must have same number of dimensions, but the array at index 0...
I am looking into ways to reveal parts of a matplotlib geneated plot in a LaTeX beamer presentation, and tikzplotlib seems to be tantalizing close to support that, if there...