best way to include mesh plot in latex

15 views (last 30 days)
hi there, As the subject suggests, I really am not sure on whats the best way to import a mesh plot generated in matlab to latex. For regular 2D plots I use matlab2tikz and I am pretty happy about that. For the mesh plot I have tried the matlab2tikz method but it produces a very large file and latex ends up giving me an error about running out of memory. The other methods which I have not tried are the ones where one converts a mesh to a U3D pdf. But this is a pdf object that one can interact with and I dont really need the viewers of my pdf to be able to do that. Also I have tried rasterising the mesh and including the png but that looks pretty bad. I just want to be able to include one view of the mesh but I want it to look as good as the vector graphics that matlab2tikz generates. If there are any other ways please let me know.
thank you for your time

Accepted Answer

Jonathan Epperl
Jonathan Epperl on 8 Apr 2013
Here's what I do: I export the figure with export_fig ( http://www.mathworks.com/matlabcentral/fileexchange/23629-exportfig) into a pdf, then I embed it into my document using the graphicx package, then I compile it using pdflatex. I think that export to eps + latex also works, but that's not what I do.
If you do that, what remains to be wanted?
  2 Comments
Houman R
Houman R on 8 Apr 2013
I just tried that and it works. I dont know why I didnt try that first! eps works just fine. This is what happens when you overcomplicate things :S
thank you! H

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!