0

I have quite a lot of 2d-data I would like to display in a 3d-plot, similar to the figure below (drawn in Python): enter image description here Until now I created those figures in pgfplots with addplot3, but for an increasing amount of data the compilation slows down significantly, until LaTeX runs out of memory. Of course I could create those figures in Python, for example, but with the drawback of either having to re-create the labels and ticks in tikz afterwards to match the font style of the document, or loose the scaling capability totally when keeping them in the figure. Tikzscale is a functionality I do not want to loose, especially after my document can either be two-column or single-column wide, and therefore I would prefer automatic rescaling of the figure.

Therefore, are there other (ideally similarly integrated as tikz) options for drawing such plots, but with improved speed?

arc_lupus
  • 1,781
  • Approximately, how many points are there per one 2d plot? – g.kov Jun 25 '21 at 10:44
  • @g.kov: Around 1-2k per plot, to properly resolve oscillations. Python handles them just fine, it's rather pgfplots which needs some time – arc_lupus Jun 25 '21 at 10:45
  • Have you tried the Asymptote as an alternative? – g.kov Jun 25 '21 at 10:49
  • Not yet. Can I integrate it the same way as pgfplots-files? – arc_lupus Jun 25 '21 at 10:51
  • Yes, there are several options for this, it's deeply integrated with (La)TeX. Check out some answers here, perhaps you could find something suitable. – g.kov Jun 25 '21 at 10:57
  • Data is stored in a file, but plotting is still extremely slow @JohnKormylo – arc_lupus Jun 25 '21 at 15:53
  • The only other option is to reduce the number of points. The human eye can only resolve to about 0.01 relative. – John Kormylo Jun 25 '21 at 16:54
  • Try [row predicate/.code={\ifodd#1\relax\else\pgfplotstableuserowfalse\fi}] (page 43 of pgfplotstable manual). – John Kormylo Jun 25 '21 at 17:01
  • Consider use knitr because then (1) you can integrate R language in LaTeX documents (,Rnw files), and (2) R can make nice 3D plot with huge amounts of data (example), and moreover (3) knitr have the option cache=TRUE so you can compile the .Rnw file many times but the R graph is only complied once if the R data are not changed. – Fran Jun 29 '21 at 08:00

0 Answers0