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 am trying to use the Export command to convert a list of plots into a *.gif file, and the command runs and executes well, but I can't find the file! Where is it supposed to go? Did it even work?

Here is my code :

  q[n_, x_] := x (1 + x)^n + x^n;
  points = Table[
     Map[{Re[#], Im[#]} &, 
   Flatten[NSolve[q[n, x] == 0, x][[All]] /. Rule -> (#2 &)]], {n, 1, 20}];

    Table[ListPlot[points[[i]], PlotRange -> {{-15, 4}, {-10, 10}}], {i, 1, 20, 1}]

Thanks in advance =)

share|improve this question
You can specify the full path. Windows example: Export["c:\\a.gif", img] – Dr. belisarius Jul 21 '12 at 22:27
I added a few more tricks in the answer, I hope it helps too ;-) – Vitaliy Kaurov Jul 21 '12 at 22:44
up vote 31 down vote accepted

Easy to check:


Which in my case on Win7 gives:


You can always specify a complete path to a destination you'd like to save with, for example, top menu Insert >> FilePath which will bring a standard browse-directory window:

enter image description here

This would go instead of your "domniationrootsstargraph.gif". A useful trick to know is command


which will allow saving your files by default (without full-path specification) into the directory where your notebook is saved. Also to check files in the CurrentDirectory use


or, for example,


for specific file types.

share|improve this answer
Thank you! Exactly what I wanted. – Patrick Da Silva Jul 21 '12 at 22:27

Just to add a slightly different method; something I like to do, since I am fairly OCD about always working in a notebook which is already saved in some directory, is to use NotebookDirectory:


This saves your file in the same directory as your .nb file, and is fairly easy to remember in a pinch.

share|improve this answer
This only works if the Notebook has first been saved. +1 nevertheless – Mr.Wizard Nov 9 '12 at 8:47

You might try

Export[SystemDialogInput["FileSave", "domniationrootsstargraph.gif"], 
   Table[ListPlot[points[[i]], PlotRange -> {{-15, 4}, {-10, 10}}], {i, 1, 20, 1}]]

This will let you pick the directory interactively.

share|improve this answer

Try this, one I compiled for my thesis writing:

Export2PDF[PlotName_] := 
Module[{A = 600}, 
StringJoin[{ToString[FileName], ".pdf"}]], PlotName, 
"AllowRasterization" -> True, ImageSize -> 360, 
ImageResolution -> A]]

Plot example:

Plot1 = Plot3D[
Sin[x] Sin[y], {x, -\[Pi], \[Pi]}, {y, -2 \[Pi], 2 \[Pi]}]



Export Code:


Dialog Box: 2



share|improve this answer
You can also right-click the figure and choose Save As... I won't give you quite as much control over the options though. – Szabolcs May 12 '13 at 18:36

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.