# How can I properly plot this region, with some filling too?

I have to plot this region:

$$A = \{(x, y)\in [0, 2]\times [0, 1]; x+y \leq 2\}$$

Here is what I did:

Plot[{2 - x, 1}, {x, 0, 2},
Epilog -> {Orange, Line[{{2, 0}, {2, 1}}], Thickness[0.04]}]


The result is efficient, but yucky. Efficient because with the proper equation aside one can see which region we are talking about. Yucky because I would like the lines to have the same colour, and the region (the quadrilateral) to be filled with some pastel colour (like a light green).

How can I do it? • Why don't you use ImplicitRegion and RegionPlot? RegionPlot[ImplicitRegion[x + y <= 2 && 0 <= x <= 2 && 0 <= y <= 1, {x, y}]] Mar 20 at 20:46
• @Domen Because it just shows the quadrilateral, and it's not what I want Mar 20 at 20:49
• Something like this? Plot[{2 - x, 1}, {x, 0, 2}, Filling -> {1 -> {2}} , PlotStyle -> Black]? Mar 20 at 21:17

Plot[{2 - x, 1, Min[2 - x, 1]}, {x, 0, 2}, Filling -> {3 -> 0},
Exclusions -> None,
Epilog -> {Orange, Line[{{2, 0}, {2, 1}}], Thickness[0.04]}] Combine ImplicitRegion, Plot and Rectangle by using Show.

Show[
RegionPlot[
ImplicitRegion[x + y <= 2 && 0 <= x <= 2 && 0 <= y <= 1, {x, y}],
PlotStyle -> LightGreen, BoundaryStyle -> None,
AspectRatio -> Automatic, PlotRange -> {{0, 2}, {0, 2}},
Plot[2 - x, {x, 0, 2}, PlotStyle -> Thick],
Graphics[{FaceForm[None], EdgeForm[{Thick, ColorData}],
Rectangle[{0, 0}, {2, 1}]}]
] Clear["Global*"];

Plot[{Min[2 - x, 1],
Tooltip[2 - x, y == 2 - x],
Tooltip[1, y == 1]},
{x, 0, 2},
PlotStyle -> ColorData,
Filling -> 1 -> Axis,
Epilog -> {ColorData,
AbsoluteThickness[1.5], Line[{{2, 0}, {2, 1}}]}] rectangle = Rectangle[{0, 0}, {2, 1}];

Plot[2 - x, {x, 0, 2},
Filling -> {1 -> {1, White}},
Frame -> True,
PlotStyle -> Thick,
Prolog -> {LightGreen, rectangle},
Epilog -> {EdgeForm[{Thick, Orange}], FaceForm[], rectangle}]
` 