2
$\begingroup$

I am attempting to fill the part of the graph when the orange line is within the blue line. I am unable to make the fill work when the lines are under manipulation. Ultimately I would like there to be a fill between the orange line and the blue line when the orange line is crossing through the blue's area. Here is what I have so far:

Manipulate[
 Show[Plot[-3.56 + 2.222 y - .22 y^2, {y, 0, 10}, 
   PlotRange -> {{0, 10}, {0, 5}}, 
   AxesLabel -> {"Home Goods", "Health Care"}, Ticks -> None, 
   PlotLabel -> "Proper Healthcare PPF", PlotStyle -> {Thick, Blue}],
  Plot[1/(.05 \[Sqrt]x) - c, {x, 0, 10}, 
   PlotRange -> {{0, 10}, {0, 3}}, PlotStyle -> {Thick, Orange}, 
   Ticks -> {{{c, "U"}}, {{0, "Healthcare Choice"}}}]], {{c, 5.8, 
   "Use of Resources"}, 5.8, 6.93}]
$\endgroup$
  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ – Michael E2 Dec 9 '14 at 3:33
  • $\begingroup$ You should format code by indenting four spaces. You can also select a code block and press the {} button to format it. $\endgroup$ – Michael E2 Dec 9 '14 at 3:34
1
$\begingroup$
Manipulate[
 Plot[
      {-3.56 + 2.222 y - .22 y^2, 1/(.05 \[Sqrt]y) - c}, {y, 0, 10},
      PlotRange -> {{0, 10}, {0, 5}}, PlotStyle -> {Blue, Orange}, 
      Filling -> {1 -> {{2}, {None, Yellow}}}], 
 {{c, 5.8, "Use of Resources"}, 5.8, 6.93}]

Mathematica graphics

$\endgroup$
  • $\begingroup$ Perfect! Thank you very much $\endgroup$ – John Dec 9 '14 at 4:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.