Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #13915

Re: RegionPlot and Show

From Bob Hanlon <hanlonr357@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: RegionPlot and Show
Date 2013-03-23 07:24 +0000
Message-ID <kijlb6$is2$1@smc.vnet.net> (permalink)
References <20130322081701.3A31A6A1A@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


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@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
>

Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: RegionPlot and Show Bob Hanlon <hanlonr357@gmail.com> - 2013-03-23 07:24 +0000
  Re: RegionPlot and Show debguy <johnandsara2@cox.net> - 2013-03-31 07:10 +0000

csiph-web