MathGroup Archive 2007

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

Search the Archive

Re: inside a loop

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82456] Re: inside a loop
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Sat, 20 Oct 2007 06:02:01 -0400 (EDT)
  • References: <200710180900.FAA23954@smc.vnet.net> <ff9rv3$582$1@smc.vnet.net>

Hi,

you don't know why ?
In versions before 6.0 Show[] and all ploting functions had
a side effect that cause the Frontend to display the graphics.
This was unique to graphics objects because

a=Expand[(x+1)^100];
b=a;

would display nothing, only

a=Expand[(x+1)^100];
Print[a];
b=a;

would do that.
But in versions<6.0

a=Plot[(x+1)^100,{x,0,1}];
b=a;

would display a graphics. This side effect is droped
in version 6.0.

Regards
   Jens

Curtis Osterhoudt wrote:
>   Hi, Luiz,
> 
>     Stick a "Print" around the "ListLinePlot" command (or just
> Do[Print at ListLinePlot[Table....  ). Why? I don't know. Perhaps the "HoldAll=
> "
> attribute for "Do", but I'm not sure.
> 
> On Thursday 18 October 2007 03:00:16 Luiz Melo wrote:
>> Hi mathgroup,
>>
>> Why is the plot of a list not displayed when ListLinePlot[] is used inside
>> a Do loop (Mathematica 6.0)?
>> For instance, suppose we want to produce the graphics of Sin[i*x] as a
>> function of x, each time i is iterated from 1 to 3 (in steps of 1). I
>> naively tryed:
>>
>> Do[ListLinePlot[Table[{x, Sin[i*x Degree]}, {x, 0, 360}],
>>    PlotRange -> {{0, 360}, {-1.1, 1.1}}], {i, 1, 3}];
>>
>> The specifications "For[]" and "While[]" don't work either.
>> Thanks,
>> Luiz
>>
>>
>>
>> --
>> Luiz Melo
>> =C9cole Polytechnique de Montr=E9al
>> D=E9partement de G=E9nie Physique
>> C.P.6079, succ. Centre-ville
>> Montr=E9al (QC) Canada
>> H3C 3A7
>> T=E9l (514)340-4711-7454
>> Fax (514)340-3218
> 
> 
> 
> =2D-
> ==========================
> ==========================
> ========
> Curtis Osterhoudt
> cfo at remove_this.lanl.and_this.gov
> PGP Key ID: 0x4DCA2A10
> Please avoid sending me Word or PowerPoint attachments
> See http://www.gnu.org/philosophy/no-word-attachments.html
> ==========================
> ==========================
> ========
> 


  • Prev by Date: Re: why no result & no error from this recursion
  • Next by Date: Re: a problem about mathematica output
  • Previous by thread: Re: ListLinePlot[] inside a loop
  • Next by thread: Re: ListLinePlot[] inside a loop