Is it possible to generate a plot in Mathematica 8 and then somehow export the data so that I can plot it using TikZ? I do not like how Mathematica's plots are rendered and would like to use proper LaTeX fonts.

This is not a simple case of just plotting a simple function, i.e. I might as well just type the plot commands in TikZ; The generated expressions I want to plot are fairly horrible and long.

EDIT: Currently in Mathematica I do something like:


 {w, 0, 10}

Where I am calculating the recurrence table of a coupled set of non-linear recurrence relations up to some n. Each term is a function of w. I hope this is helpful. I doubt that I want to do the calculation using TeX.

  • Do you have trouble importing your data from Mathematica or replotting them via TikZ?
    – percusse
    Sep 10 '11 at 14:50
  • What type of plot are you going to make? An 1d line plot? scatter? 2d surface plots? In case of 2d: is orthogonal projection sufficient? In any of these cases, pgfplots might be of help - where it would probably be the best approach to import table data into pgfplots (nonlinear systems of equations are unsupported ;-) ). Sep 10 '11 at 19:06
  • Export the plot data as a text (csv for example) file, say col x and col y, and then import into latex? Sep 11 '11 at 7:06
  • 3
    I have asked a similar question in mathematica.stackexchange.com mathematica.stackexchange.com/questions/2377/…
    – akk
    Feb 27 '12 at 11:33

Well, ideally, if you use TikZ + PGFPlots, then you can basically do many things. We might elaborate if you have a particular example in mind.


There is always the round-about way with exporting the entire graphic as an EPS. Then, using psfrag or psfragx, you can substitute tags or labels in the rendered EPS with LaTeX text; almost like a search-and-replace.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.