I have to make a document with multiple bar charts and export it:

A = BarChart[Table[CAB[[1, i]], {i, 16}], ChartLabels -> {"1", "2", "3", "4", "5", "6", "7", 
    "8", "9", "10", "11", "12", "13", "14", "15", "16"}];
Export["Barcharts_2.tex", A];

This is not a problem, but when I try to export multiple bar charts (in my case sixteen):

A = (BarChart[Table[CAB[[1, i]], {i, 16}]]
     BarChart[Table[CAB[[2, i]], {i, 16}]])
Export["Barcharts_2.tex", A];

I get this error:


Could anyone help me with this?

  • 1
    $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2)Read the FAQs! 3) When you see good Q&A, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. ALSO, remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign` $\endgroup$
    – chris
    Nov 3, 2012 at 19:47

1 Answer 1


May be its a matter of using GraphicsRow?

  plot = GraphicsRow[{ BarChart[Table[i, {i, 5}], ChartStyle -> "DarkRainbow"],
  BarChart[{{1, 2, 3}, {1, 3, 2}}] }]

Mathematica graphics



I didn't know you could export directly graphs to TeX so I learnt something! ;-)

  • $\begingroup$ Actually, what the Export does here is create (1) a skeleton .tex document text.tex that has an \includegraphics command; and (2) an .eps file with the actual graphics. That is pretty neat! $\endgroup$
    – murray
    Nov 3, 2012 at 17:55
  • $\begingroup$ Thank you very much, it solved my problem entirely. I'm quite new to Mathematica :) Glad to help you too!! $\endgroup$ Nov 3, 2012 at 19:22
  • 1
    $\begingroup$ This seems a little hit and miss, GraphicsGrid doesn't seem to work. $\endgroup$ Nov 3, 2012 at 21:54
  • $\begingroup$ @image_doctor it does for mac-os 10.7.5 + mathematica 8.0.4 (?) i.e. it produces a latex file and an eps file which you can process? $\endgroup$
    – chris
    Nov 4, 2012 at 8:08
  • $\begingroup$ GraphicsRow seems to work fine, but GraphicsGrid doesn't - Linux - 8.0.4 $\endgroup$ Nov 5, 2012 at 9:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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