Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: export graphics

  • To: mathgroup at smc.vnet.net
  • Subject: [mg22235] Re: [mg22202] export graphics
  • From: Hugh <hugh at his.com>
  • Date: Sat, 19 Feb 2000 01:33:35 -0500 (EST)
  • References: <200002180734.CAA08209@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com



I tried this out on my system (RH 6.0 Linux,
Mathematica 4.0) and it seems to
work...

anim1 = Table[
      Plot[Exp[-(x - i/3)^2], {x, 0, 10},
PlotRange -> {0, 1}], {i, 1, 15}];

Export["anim_1.gif", anim1];
Export["anim_1_loop.gif", anim1, ConversionOptions
-> {"Loop" -> True}];

The first export being an animated gif that isn't
"looped".  The second one having the loop option
set to True.


But I also tried your example,

gr2 = Plot[Sin[x], {x, -Pi, Pi}];
Export["gr.gif", gr2];

and that seemed to work as well.


Hope this helps,

Hugh.


schadow at netcom.ca wrote:
> 
> 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
> 
> ========================================================================


  • Prev by Date: Re: Mathematica bug in Graphics3D ??
  • Next by Date: Re: Legend Package
  • Previous by thread: Re: export graphics
  • Next by thread: Re: export graphics