1.11.4 Exporting Graphics and SoundsMathematica allows you to export graphics and sounds in a wide variety of formats. If you use the notebook front end for Mathematica, then you can typically just copy and paste graphics and sounds directly into other programs using the standard mechanism available on your computer system.
| Export["name.ext", graphics] | export graphics to a file in a format deduced from the file name | | Export["file", graphics, "format"] | export graphics in the specified format |
Export["!command", graphics, "format"]
| | export graphics to an external command |
Exporting Mathematica graphics and sounds.
| graphics formats | "EPS", "TIFF", "GIF", "JPEG", "PNG", "PCX", "PDF", "SVG", etc. | | sound formats | "SND", "WAV", "AIFF", "AU", etc. |
Some common formats for graphics and sounds. Section 2.10.19 gives a complete list. | This generates a plot. | |
In[1]:=
Plot[Sin[x] + Sin[Sqrt[2] x], {x, 0, 10}]
|
Out[1]=
|
|
| This exports the plot to a file in Encapsulated PostScript format. | |
In[2]:=
Export["sinplot.eps", %]
|
Out[2]=
|
|
|