MathGroup Archive 2013

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

Search the Archive

Re: RegionPlot and Show

  • To: mathgroup at smc.vnet.net
  • Subject: [mg130225] Re: RegionPlot and Show
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Sat, 23 Mar 2013 03:24:51 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <20130322081701.3A31A6A1A@smc.vnet.net>

Plot[
 Evaluate[
  Table[Tooltip[x^i], {i, 0, 3}]],
 {x, 0, 1}]

plts = Table[a[i] =
    Plot[Tooltip[x^i], {x, 0, 1},
     PlotStyle -> Hue[i/4]],
   {i, 0, 3}];

Show[plts, PlotRange -> {0, 1.1}]

Show[Table[a[n], {n, 0, 3}],
 PlotRange -> {0, 1.1}]

offsets = RandomReal[1, {4, 2}];

plts = Table[RegionPlot[
    (x - offsets[[i, 1]])^2 +
      (y - offsets[[i, 2]])^2 < 2,
    {x, -3, 3}, {y, -3, 3},
    PlotStyle -> Opacity[.5, Hue[i/4]]],
   {i, 4}];

Show[plts]

rgnUnion = RegionPlot[
  Or @@ Table[
    (x - offsets[[n, 1]])^2 +
      (y - offsets[[n, 2]])^2 < 2,
    {n, 4}],
  {x, -3, 3}, {y, -3, 3},
  PlotStyle -> Lighter[Blue, .6]]

rgnIntersect = RegionPlot[
  And @@ Table[
    (x - offsets[[n, 1]])^2 +
      (y - offsets[[n, 2]])^2 < 2,
    {n, 4}],
  {x, -3, 3}, {y, -3, 3},
  PlotStyle -> Lighter[Red, .4]]

Show[rgnUnion, rgnIntersect]


Bob Hanlon


On Fri, Mar 22, 2013 at 4:17 AM, Ilinca <ilinca.s at gmail.com> wrote:
> Hi All,
>
> I have a couple of questions.
>
> 1. If I generate a sequence of plots in a loop with index i and I name the plots A[i], can I use Show in a smarter way than actually listing all myself ?
> E.g., I would like that instead of
> Show[A[1],A[2], etc...]
> to be able to type something like
> Show[A[i] for all i in a range]
>
> 2. Now say that each A[i] is a regionplot. I would like to get their reunion.
> I know I can technically plot by overlapping all of them to get it but if there are many, the size of the resulting figure is too large due to many layers on top of  each other.
>
> Thank you for any suggestion you may be able to offer
>
> Ilinca
>



  • Prev by Date: Manipulate and Initialization
  • Next by Date: Integrate with unknow function
  • Previous by thread: RegionPlot and Show
  • Next by thread: Re: RegionPlot and Show