How do you rotate an object in a graph??

It depends on what point you are rotating the plot. The math is somewhat advanced, so I don't know your level.

i just need to rotate it..like 180 and 90....

Ok, rotating about the origin.

For ninety degrees, counter clockwise, the old x becomes new y, old y becomes -x

So change all y's in the equation to -x, and all x's to y.

For a rotation of 180 deg, the old x becomes -x, the old y becomes -y.