1
$\begingroup$

How can I colour the two regions inside the triangle upper and down the parabola plotted together but with different intervals of the variables? The input text I wrote in Mathematica is

Show[
 Plot[{1/3 - 2/3 γ}, {γ, 0, 1/2}, AxesLabel -> {γ, λ}, PlotStyle -> CMYKColor[0, 0, 0, 1]],
 Plot[γ^2, {γ, 0, 1/3}, AxesLabel -> {γ, λ}, PlotStyle -> CMYKColor[0, 0, 0, 1]]] 
$\endgroup$
3
$\begingroup$
Plot[{1/3 - 2/3 γ, Min[1/3 - 2/3 γ, γ^2]}, {γ, 0, 1/2}, 
    AxesLabel -> {γ, λ}, PlotStyle -> Black, 
    Filling -> {1 -> {{2}, Yellow}, 2 -> {Axis, Red}}]

Mathematica graphics

$\endgroup$
  • $\begingroup$ Thank you so much for your answer $\endgroup$ – Michaels Apr 22 '17 at 16:38
  • $\begingroup$ @Michaels, my pleasure. Welcome to mma.se. $\endgroup$ – kglr Apr 22 '17 at 19:21

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.