Skip to content

Commit 99a2c9d

Browse files
added small hint in README
1 parent 9ba5973 commit 99a2c9d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,21 @@ to install/update.
139139
\usepgfplotslibrary{dateplot}
140140
```
141141

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+
142157
### Contributing
143158

144159
If you experience bugs, would like to contribute, have nice examples of what

0 commit comments

Comments
 (0)