
Re: RegionPlot and Show
Posted:
Mar 23, 2013 3:24 AM


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 >

