Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

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

Search the Archive

Re: Table[Plot[]]doesn't work as it should in v6

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84297] Re: Table[Plot[]]doesn't work as it should in v6
  • From: Helen Read <hpr at together.net>
  • Date: Tue, 18 Dec 2007 02:18:09 -0500 (EST)
  • References: <fk73se$6d7$1@smc.vnet.net>
  • Reply-to: HPR <read at math.uvm.edu>

sean_incali wrote:
> I have this code for v5. It generates list of plots(i think) which
> then can collapsed into single cell that shows the first graph which
> can be animated by double clicking on it.
> 
> Table[Plot[i/(1 + y^2), {y, 0, 8},
>   PlotStyle -> RGBColor[1, (i - 0.8)/i, 0], PlotRange -> {0, 8},
>   AspectRatio -> Automatic], {i, 1, 8, 0.1}]
> 
> In v6, the same code seems to make a graphics array surrounded by
> curly brackets and separated by commas. (what is with this?  is there
> not a way to get rid of these puctuations?)

Try

Row[Table[Plot[i/(1 + y^2), {y, 0, 8},
PlotStyle -> RGBColor[1, (i - 0.8)/i, 0], PlotRange -> {0, 8},
AspectRatio -> Automatic], {i, 1, 8, 0.1}]]

or

Column[Table[Plot[i/(1 + y^2), {y, 0, 8},
PlotStyle -> RGBColor[1, (i - 0.8)/i, 0], PlotRange -> {0, 8},
AspectRatio -> Automatic], {i, 1, 8, 0.1}]]

to eliminate the commas and braces.

> Of course I don't need, at the moment, to have an animation. But i
> always thought it was a nice, simple application of Table that had a
> great result.


Use Manipulate or Animate in place of Table.

Like this:

Manipulate[
  Plot[i/(1 + y^2), {y, 0, 8},
   PlotStyle -> RGBColor[1, (i - 0.8)/i, 0], PlotRange -> {0, 8},
   AspectRatio -> Automatic], {i, 1, 8, 0.1}]

Or this:

Animate[Plot[i/(1 + y^2), {y, 0, 8},
   PlotStyle -> RGBColor[1, (i - 0.8)/i, 0], PlotRange -> {0, 8},
   AspectRatio -> Automatic], {i, 1, 8, 0.1}]


-- 
Helen Read
University of Vermont


  • Prev by Date: Interesting problem: Use of NonlinearRegress inside a package
  • Next by Date: Re: Table[Plot[]]doesn't work as it should in v6
  • Previous by thread: Table[Plot[]]doesn't work as it should in v6
  • Next by thread: Re: Table[Plot[]]doesn't work as it should in v6