Plots graphs in 3D