File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,21 @@ to install/update.
139
139
\usepgfplotslibrary{dateplot}
140
140
```
141
141
142
+ 4 . Optional: clean up the figure before exporting to tikz using the `clean_figure` command.
143
+ ```python
144
+ import matplotlib.pyplot as plt
145
+ import numpy as np
146
+
147
+ # ... do your plotting
148
+
149
+ import tikzplotlib
150
+ tikzplotlib.clean_figure()
151
+ tikzplotlib.save(" test.tex" )
152
+ ```
153
+ The command will remove points that are outside the axes limits, simplify curves and reduce point density for the specified target resolution.
154
+
155
+ The feature originated from the [matlab2tikz](https:// github.com/ matlab2tikz/ matlab2tikz) project and is adapted to matplotlib.
156
+
142
157
# ## Contributing
143
158
144
159
If you experience bugs, would like to contribute, have nice examples of what
You can’t perform that action at this time.
0 commit comments