MathGroup Archive 2008

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

Search the Archive

Re: Why don't my plots appear? My 5.2 code no longer works

  • To: mathgroup at smc.vnet.net
  • Subject: [mg89378] Re: [mg89326] Why don't my plots appear? My 5.2 code no longer works
  • From: George Woodrow III <georgevw3 at mac.com>
  • Date: Sat, 7 Jun 2008 03:01:11 -0400 (EDT)
  • References: <200806061044.GAA24071@smc.vnet.net>

Read the fine documentation. Or even, an noted below, just follow  
Mathematica's advice when you open an older document.

With Mathematica 6, the syntax for Plot and other similar functions has  
changed. In older versions, the graphics were a side effect of the  
computation, so the semi-colon just suppressed the "-- Graphics --"  
line beneath the graph.

In the new version, the graphs *are* the output, so putting the semi- 
colon at the end suppresses the graph.

When you first open an older notebook with Mathematica 6, it advises you that  
this is an older notebook and offers to go through suggesting changes.  
This is one of the changes it suggests -- removing the semi-colon  
after graphs -- so if you had followed the program's own advice, you  
would not have had this problem.

Mathematica 6 has syntax highlighting, so the semi-colon in RED is s clue that  
there is a problem.

If you use graphics a lot, you should definitely go through the What's  
new... section of the electronic documentation. There are a lot of  
improvements and better ways to do things like combine graphs, etc.


george

On Jun 6, 2008, at 6:44 AM, Charlie Brummitt wrote:

> Hello,
> I am running into difficulties with Plot. Some code of mine that  
> worked in
> 5.2 no longer works correctly in 6.0.2.0. Specifically, no plots  
> appear
> whenever Plot (or Plot3D or DensityPlot or ListPlot) is called  
> within a
> function that I have defined.
>
> Here is a closely related question: What does the red semicolon ";"  
> mean at
> the end of "Plot[ ... ];"? Why is it red? In 5.2, placing a  
> semicolon at the
> end of Plot[] allowed me to output a plot in the middle of a  
> computation,
> without halting the computation. Now I can no longer seem to output  
> a plot
> in the middle of a long computation. (I only see the output of Print[]
> commands.) I must be able to see these plots during long  
> computations, like
> I was able to in 5.2.
>
> What's wrong? Can anyone please help?
>
> Thanks,
>
> Charlie
>
>



  • Prev by Date: Re: Integral Questions
  • Next by Date: Re: NonlinearRegress fitfail error
  • Previous by thread: Re: Why don't my plots appear? My 5.2 code no longer works correctly in 6.0
  • Next by thread: Re: Why don't my plots appear? My 5.2 code no longer works