MathGroup Archive 2007

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

Search the Archive

Re: Plot[], Show[] and ; in Version 6

  • To: mathgroup at
  • Subject: [mg76495] Re: [mg76433] Plot[], Show[] and ; in Version 6
  • From: Murray Eisenberg <murray at>
  • Date: Wed, 23 May 2007 05:18:58 -0400 (EDT)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <>
  • Reply-to: murray at

Simple solution: enclose the first Plot with Print!

Some words of explanation: A block (or Module) should NOT display any 
result other than the final one: the old behavior, in 5.2, resulted only 
from the fact that the display of a graphic was a side-effect and not 
the result.  In 6.0, the display IS the result.

Now the second argument of a Block is a CompoundExpression (with the 
special input form using semicolons to separate the arguments of the 
CompoundExpression). So, as you've discovered, any Plot expression 
before the final one in the CompoundExpression produces no result.

yasdfer at wrote:
> Since version 6.0 suppresses Plot/Show outputs with ; (semicolon), how
> do you plot and then do additional numerical (or graphical) outputs? I
> have a lot of existing notebooks that follow such pattern and I am
> hoping that there are some quick fixes.
> For example, the following would work in older version and not in 6:
> Block[{x=1,y=2},
> Plot[x,{x,0,1}];
> Print[Sqrt[y]];
> Plot[x^2,{x,0,1}]
> ]
> Thanks,
> -Victor

Murray Eisenberg                     murray at
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

  • Prev by Date: Re: Re: Mathematica 6 review [first impressions]
  • Next by Date: Re: Using Locators in Mathematica v6
  • Previous by thread: Re: Plot[], Show[] and ; in Version 6
  • Next by thread: Re: Plot[], Show[] and ; in Version 6