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 =)

  • 4
    $\begingroup$ You can specify the full path. Windows example: Export["c:\\a.gif", img] $\endgroup$ – Dr. belisarius Jul 21 '12 at 22:27
  • 1
    $\begingroup$ I added a few more tricks in the answer, I hope it helps too ;-) $\endgroup$ – Vitaliy Kaurov Jul 21 '12 at 22:44

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.

| improve this answer | |
  • $\begingroup$ Thank you! Exactly what I wanted. $\endgroup$ – 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.

| improve this answer | |
  • $\begingroup$ This only works if the Notebook has first been saved. +1 nevertheless $\endgroup$ – 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.

| 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



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

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.