Re: Why don't my plots appear? My 5.2 code no longer works correctly
- To: mathgroup at smc.vnet.net
- Subject: [mg89379] Re: Why don't my plots appear? My 5.2 code no longer works correctly
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Sat, 7 Jun 2008 03:01:22 -0400 (EDT)
- Organization: The Open University, Milton Keynes, UK
- References: <g2b4nj$nlf$1@smc.vnet.net>
Charlie Brummitt wrote:
> 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.
[snip]
The graphic engine has been completely redesigned in version 6.xx.
Graphs are no longer a side effect of the plotting function; on the
contrary, they are first class objects. In other words, the graph is the
output. The semi-column, as previously in v5.2, prevents the result of
an evaluation to be displayed, so evaluating
Plot[Sin[x], {x, 0, 2 Pi}];
yields no output. You must use
Plot[Sin[x], {x, 0, 2 Pi}]
for a single expression, or use a print statement if the plot occurs
within a compound expression:
Print[Plot[Sin[x], {x, 0, 2 Pi}]]
Regards,
-- Jean-Marc