MathGroup Archive 2007

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

Search the Archive

Re: How to show the plot in Module[{}, ]?


foxvexon schrieb:
> Hi, all,
>   I am moving to V6 from V5.2.
>   Everything feels good except that I can't show the plots in { }
> regions.
>   For example, by the following lines:
>
>   a[] := Module[{},
>   Print["I'll be good!"];
>   Plot[Cos[x], {x, 0, 10}];
>   Print["Fine,me too"];
>   ]
>
>   in V5.2, the outputs would be:
>
>   I'll be good
>   cosine plot
>   Fine, me too
>
>   but in V6, only
>
>   I'll be good
>   Fine, me too
>
>   even when I eliminate the semicolon after plot (which, you know,
> will causes disorder arrangement of lines).
>
>   Please help, thanks a lot in advance!
>
>

This seems to work:

a = Module[{pp},
  pp = Plot[Cos[x], {x, 0, 10}];
  Print["I'll be good"];
  Print[pp];
  Print["Fine, me too"];
  ]

Gruss Peter
-- 
==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de


  • Prev by Date: Re: apparently I don't know how to use Map (or Apply or MapThread)
  • Next by Date: Re: apparently I don't know how to use Map (or Apply or MapThread)
  • Previous by thread: Re: How to show the plot in Module[{}, ]?
  • Next by thread: Re: How to show the plot in Module[{}, ]?