Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Re: Incredible slow Plot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg120152] Re: Incredible slow Plot
  • From: Peter Pein <petsie at dordos.net>
  • Date: Sun, 10 Jul 2011 05:01:06 -0400 (EDT)
  • References: <iv9etb$dg1$1@smc.vnet.net>

Am 09.07.2011 13:43, schrieb Iván Lazaro:
> Hi!
> 
> I'm trying to Plot a result from NDSolve. The problem is that when I
> pass this solution to Plot it takes an incredible long time (four
> hours for times between 0 and 1200) to plot. I tried generating an
> image file (.jpg, .eps, etc.) but that doesn't change anything. I
> tried also giving to Plot the option PerformanceGoal -> "Speed", but
> it gives me only half an hour less of waiting time. The other options
> (like PlotPoints -> Number, MaxRecursion -> 0 ) give an improvement
> but the image is ugly unless PlotPoints is high, which at the end is
> the same.
> 
> I tried also asking for Plot only the last 200 units of time, trying
> to avoid the most oscillating part of the graphic, but that really
> doesn't help (and really it's not what I need).
> 
> Finally, the resulting InterpolatingFunction, when evaluated outside
> Plot, evaluates fast, and a ListPlot using points returned by a Table
> works well, but the resulting graphic is insanely big (35, 36 Mb) if I
> put the points necessary to give account of the features of the
> dynamic.
> 
> Unfortunately I can't give you an example because the equations I'm
> solving are too long, but I wonder if there is someway to generate the
> graphic, either on the interface or in a file, to not be so slow.
> 
> Thanks in advance, and sorry for this vague question (which, by the
> way, without examples, is useless... by I had to give it a try).
> 
Hi,

did you try

sol=NDSolve[{eqns, cond},f,{t,0,1200}][[1]];
Plot[Evaluate[f[t]/.sol],{t,0,1200}]

?

Peter


  • Prev by Date: Re: sequence of functions
  • Next by Date: Re: Bug 1+4/10
  • Previous by thread: Re: Incredible slow Plot
  • Next by thread: Re: Incredible slow Plot