fixing the layout of the graph