# How do I shade in a graph using Socratic's graph function?

##### 1 Answer

Mar 8, 2017

Through the use of less than and greater than functions.

#### Explanation:

You can use less and greater than equations to create shading.

A simple example is

graph{y < x [-10, 10, -5, 5]}

And

graph{y <= -x [-10, 10, -5, 5]}

We can put them together (I'm using "(y-x)(y+x)<0"):

graph{(y-x)(y+x) < 0 [-10,10,-5,5]}

And you can use this functionality to make shapes by graphing lines and curves and then using functions to limit what is actually graphed. This answer has more on that: