I am writing some code in which I combine a ParametricPlot[] with a RegionPlot[]. Mathematica is very good at figuring out appropriate bounds for the ParametricPlot[], and I would like to reuse the same bounds for creating the RegionPlot[]. How can I tell Mathematica to reuse the bounds?
Asked
Active
Viewed 98 times
1
David Zhang
- 2,316
- 15
- 25
1 Answers
2
Show[RegionPlot[x + y < 1/2, Evaluate[Sequence @@ MapThread[Join, {{{x}, {y}}, (PlotRange /.
AbsoluteOptions[#, PlotRange])}]]],
#] &@ ParametricPlot[{Sin[u], Sin[2 u]}, {u, 0, 2 Pi}]

Dr. belisarius
- 115,881
- 13
- 203
- 453
-
The construction
(PlotRange /. AbsoluteOptions[#, PlotRange])can in fact be substituted, I think, by the much simplerPlotRange[#]. As far as I can tell this is not documented in thePlotRangedocumentation, but it does seem to work. – Emilio Pisanty Aug 20 '14 at 15:30 -
@episanty Efectivamente. I learnt about that in a recent answer here. Thanks! – Dr. belisarius Aug 22 '14 at 16:10
PlotRange, then the functioncompletePlotRangein this answer to How to get the real PlotRange using AbsoluteOptions? might be of interest. – Michael E2 Nov 23 '13 at 22:22