Hot answers tagged export
6
You can export animations to SWF:
movie = Animate[Plot[Sin[x + a], {x, 0, 10}], {a, 0, 5}];
Export["movie.swf", movie]
You can import them in LaTeX (see TeX SE):
\documentclass{article}
\usepackage{media9}
\begin{document}
\includemedia[
activate=pageopen,
width=405pt,height=292pt,
]{}{movie.swf}
\end{document}
(I had to insert ...
4
I recommend you create a List of lists (which is how you represent an array or matrix in Mathematica):
mytable = Prepend[data, label]
(* {{"x", "y", "z"}, {0.15339, 0.622021, 0.932763}, {0.804435, 0.894563, 0.0611165}, {0.786724, 0.980867, 0.766825}} *)
Then Export it to an Excel file:
Export["mytable.xls", mytable]
And then import it into Word, which ...
3
This is definitely a problem in Xorg or multiple drivers. The behavior you describe, i.e. logging out, appears on machine with Intel graphics. If you try this on nVidia machine with nvidia driver, you'll have a hang.
Now, you may be lucky to have something in /var/log/Xorg.0.log*. Here's what I have near the end of /var/log/Xorg.0.log.old.
The workaround is ...
1
Using the ImageSize and ImageResolution options can be a bit tricky sometimes, but this will usually work:
g = Plot[Sin[x], {x, 0, 10}]
cm = 72/2.54 (* centimetre *)
Export["figure.tiff", Show[g, ImageSize -> 10 cm], ImageResolution -> 300]
This will export an image 10 cm wide with 300 dpi resolution.
The important point was to use ImageSize ...
1
Extended comment
I ran this code several times, with different values for n, and using Map or Do as well as ParallelMap. Each time a plot was created and exported, Mathematica's memory in use increased by about 1.7MB. We can call this a 'leak', but it seems to be by design.
So, with n as 1000, and allowing for some memory for the front end and the kernel ...
1
Actually, *.avi or *. SWF can be read by Adobe Acrobat Pro.
You can try as Michael E2 did:
movie = Animate[Plot[Sin[x + a], {x, 0, 10}], {a, 0, 5}];
Export["C:\\movie.avi", movie]
Use Adobe Acrobat Pro to open the file exported, i.e., C:\movie.avi.
Double click on the figure will animate it.
Only top voted, non community-wiki answers of a minimum length are eligible
