To graph the function we first need to draw our coordinate axis:
Now, the function given is a piecewise function. This means that we have to dra different curves in different intervals.
For the first interval given:
we notice that the value given by the function is always 1, this means that we have to draw an horizontal line at y=1 from the values 0 to 2 on the x axis. Furthermore since the x can be equal to zero but have to be less than 2 we need to draw a solid circle at the left end and a hollow circle at 2, this means that the first piece of the graph is:
Following the same procedure for the rest of the pieces we have that the graph of the function is: