1
$\begingroup$

I have a RegionPlot graph in Mathematica, which shows the solution to complex inequalities. In the same 2-dimensional space, I would like to plot a function . Any Help?

Thanks!

Update 1

Here is my try which should highlight the region where t < 3/2 \[Lambda] and plot the functions. However, the command only shows the Region Plot and not the Plots

Show[RegionPlot[t < 3/2 \[Lambda], {t, 1, 2}, {\[Lambda], 17/41, 1}], 
 Plot[{thatLP[\[Lambda]], thatLS[\[Lambda]]}, {\[Lambda], 17/41, 1}]]

Update 2

Here is my try which should highlight the region where t < 3/2 \[Lambda] and plot the function t=\[Lambda]. However, the command only shows the Region Plot and not the Plots

Show[{RegionPlot[
   t < 3/2  \[Lambda], {t, 1, 2}, {\[Lambda], 17/41, 1}], 
  Plot[t, {\[Lambda], 17/41, 1}]}]

My Regions and Functions are more complicated, but even this simple example does not work...

$\endgroup$
5
  • $\begingroup$ Welcome to the community. I think Show could be helpful. If you add more detail about your problem, we could help you better. $\endgroup$ Commented Dec 17, 2022 at 17:12
  • $\begingroup$ Please provide a concrete example for the type of problem you are working with. Include the code (copy and paste-able InputForm) for what you have tried. $\endgroup$ Commented Dec 17, 2022 at 17:12
  • $\begingroup$ @BenIzd Thanks! I am trying with Show. For example, I am writing: Show[RegionPlot[t < 3/2 [Lambda], {t, 1, 2}, {[Lambda], 17/41, 1}], Plot[{thatLP[[Lambda]], thatLS[[Lambda]]}, {[Lambda], 0, 1}]] Which should highlight the region where t<3/2 \Lambda and Plot the functions: thatLP[[Lambda]], thatLS[[Lambda]. However, the command only shows the Region Plot and not the Plots. But if I only ask to Plot them, it works... $\endgroup$ Commented Dec 17, 2022 at 17:40
  • $\begingroup$ @BobHanlon Thanks. I am writing: Show[RegionPlot[t < 3/2 [Lambda], {t, 1, 2}, {[Lambda], 17/41, 1}], Plot[{thatLP[[Lambda]], thatLS[[Lambda]]}, {[Lambda], 0, 1}]] Which should highlight the region where t<3/2 \Lambda and Plot the functions: thatLP[[Lambda]], thatLS[[Lambda]. However, the command only shows the Region Plot and not the Plots. But if I only ask to Plot the function, it works... $\endgroup$ Commented Dec 17, 2022 at 17:44
  • $\begingroup$ If possible, please edit and add the definitions of your function (thatLP and thatLS) so that we can reproduce the output. $\endgroup$ Commented Dec 17, 2022 at 17:51

1 Answer 1

2
$\begingroup$

"Show" take its options from the first plot. To override this, you must specify the option in "Show". In this case, you must specify "PlotRange":

Show[{RegionPlot[t < 3/2 \[Lambda], {t, 1, 2}, {\[Lambda], 17/41, 1}],
   Plot[\[Lambda], {\[Lambda], 17/41, 1}]}, PlotRange -> All]

enter image description here

$\endgroup$
0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.