I use “Desmos” app on my Android to plot functions. Is there any app by which I can draw rectangle on the graphs like this:
Best Answer
There's a neat way to do that in Desmos without using another app, that I actually didn't know about until your question inspired me to go looking.
The input
$$y\le3\ \{0\le x\le1\}\{y\ge0\}$$
produces the following graph:
The expressions in brackets restrict the domain and range of whatever comes before, whether it's an equation or inequality. If you want, you can make it a little nicer looking by also graphing $x=1\ \{0\le y\le3\}$, which gets you this graph:
And finally, here's a Desmos-ified version of the picture you included:
You've discovered Voronoi diagrams! They are natively supported by GeoGebra's Voronoi() command. The Wikipedia article also links to efficient algorithms that may be implemented in other programs.
Best Answer
There's a neat way to do that in Desmos without using another app, that I actually didn't know about until your question inspired me to go looking.
The input $$y\le3\ \{0\le x\le1\}\{y\ge0\}$$ produces the following graph:
The expressions in brackets restrict the domain and range of whatever comes before, whether it's an equation or inequality. If you want, you can make it a little nicer looking by also graphing $x=1\ \{0\le y\le3\}$, which gets you this graph:
And finally, here's a Desmos-ified version of the picture you included:
(Here's the link to the graph I used to make all those pictures, so you can go play around with rectangles for yourself: https://www.desmos.com/calculator/hiqqj1ozdl)