Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

migrated from Nov 3 '12 at 13:58

This question came from our site for professional and enthusiast programmers.

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` – chris Nov 3 '12 at 19:47
up vote 5 down vote accepted

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! ;-)

share|improve this answer
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! – murray Nov 3 '12 at 17:55
Thank you very much, it solved my problem entirely. I'm quite new to Mathematica :) Glad to help you too!! – user1792605 Nov 3 '12 at 19:22
This seems a little hit and miss, GraphicsGrid doesn't seem to work. – image_doctor Nov 3 '12 at 21:54
@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? – chris Nov 4 '12 at 8:08
GraphicsRow seems to work fine, but GraphicsGrid doesn't - Linux - 8.0.4 – image_doctor Nov 5 '12 at 9:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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