Re: Behaviour of Plot/ListPlot & Export

*To*: mathgroup at smc.vnet.net*Subject*: [mg31749] Re: Behaviour of Plot/ListPlot & Export*From*: "Avraham Shinnar" <as1619 at columbia.edu>*Date*: Sat, 1 Dec 2001 02:43:38 -0500 (EST)*Organization*: Columbia University*References*: <9u4gb3$loh$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

The Plot function plots the function between the two boundary points, sampling as many poinmt as it needs to graph it. Table[expr, {x,start,end,di}] evaluates expr[x] with x going from start to end in steps di. if di is not specified, as in your example, it defaults to 1,. Thus your table example steps through the integers, whereas plot does not make guarantees about what points will be evaluated. "SteveC" <steve at fractalus.com> wrote in message news:9u4gb3$loh$1 at smc.vnet.net... > Mathematica 4.1.1.0 on Linux > > If I try > > Plot[Sqrt[Prime[n]/Prime[n + 1]], {n, 1, 100}] > > I get: > > Prime::"intpp": "Positive integer argument expected in \ > \!\(Prime[1.000004125`]\)." > Prime::"intpp": "Positive integer argument expected in \ > \!\(Prime[1.000004125`]\)." > Prime::"intpp": "Positive integer argument expected in \ > Prime[2.0000041250000002`]." > > And a bunch more errors, however if I try > > ListPlot[Table[Sqrt[Prime[n]/Prime[n + 1]], {n, 1, 100}]] > > Then it works fine. Presumably Table[x,{x,1,100}] steps through integers > while Plot does not. This is surprising, I expected the same behaviour of > them. Is this a bug? Is this documented (I did look around)? > > I have been doing a lot of work with Export[]ing single cells and animated > Gifs. I find Mathematica on something like > Export["somefile.gif",Table[<big list of graphics>]] will produce the > graphics and then export individual frames to /tmp/m<some number> as PNM > files *incredibly* slowly. It will take 3 minutes per image and they are > not complex images. > > The CPU is not utilised during that time, only in small bursts, wait a few > minutes then do the next. For 100 cell animations this is frustrating. The > process tree has PNM.exe and GIF.exe running but doing nothing. Perhaps > they are timing out on some operation? I could run traces for the truely > interested... > > Once it has exported all the images it appears to then keep them all in > memory before creating the GIF. I recently had a 600 frame animation [I > appreciate this should be in an mpeg, and I did so] where mathematica used > 1 Gigabyte of memory plus 128 meg of swap before the kernel VM killed it > for eating all available resources. I respectfully suggest this > architecture is flawed. I am now using ImageMagick for all of these > operations. :-/ > > Also, Mathematica has a bug that I submitted where it crashes on changing > some prefs which was confirmed. > > As an aside is there a version release > than mine and if so am I able to > obtain it? > > tia > > SteveC steve at fractalus.com fractalus.com/steve >