export graphics
- To: mathgroup at smc.vnet.net
- Subject: [mg22202] export graphics
- From: schadow at netcom.ca
- Date: Fri, 18 Feb 2000 02:34:38 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
Inspired by a question about animated gif I tried to build some my own,
but without success:
<< Graphics`Animation`
gr = Animate[
Plot[Sin[x t], {x, -\[Pi], \[Pi]}, PlotRange -> {-1, 1}], {t, 0, 1}]
Export["gr.gif", gr,"GIF"]
gives the error message
Export::"type": "\!\(Null\) cannot be exported to the \!\(\"GIF\"\)
format."
Let's try a single picture:
gr2 = Plot[Sin[x], {x, -Pi, Pi}]
Export["gr.gif", gr2]
gives a black gif picture. On the other hand
Export["gr.eps", gr2]
works fine.
A more successful way to get a GIF image is:
Display["gr.gif", gr2, "GIF"]
The online help says
?Display
Display[channel, expr,"format\"] writes boxes, cells or notebook
expressions in the specified format."
?Export
Export[\"file\", expr, \"format\"] exports data to a file, converting it
to the specified format."
So, the calling sequence is similar, but only the latter case worked for
me. What am I doing wrong here, and moreover how do I get the animated
gif? (I am working with Mathematica 4.0 under Linux)
Thanks for your help,
Wolfgang
========================================================================
Wolfgang Schadow Phone: +1-604-222-1047 ext. 6453 (office)
TRIUMF +1-604-875-6066 (home)
Theory Group FAX: +1-604-222-1074
4004 Wesbrook Mall
Vancouver, B.C. V6T 2A3 email: schadow at triumf.ca
Canada www : http://www.triumf.ca/people/schadow
========================================================================
- Follow-Ups:
- Re: export graphics
- From: Hugh <hugh@his.com>
- Re: export graphics