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?
ImplicitRegion
andRegionPlot
?RegionPlot[ImplicitRegion[x + y <= 2 && 0 <= x <= 2 && 0 <= y <= 1, {x, y}]]
$\endgroup$Plot[{2 - x, 1}, {x, 0, 2}, Filling -> {1 -> {2}} , PlotStyle -> Black]
? $\endgroup$