For some graphics, it is important to set the aspect ratio of the graph to 1, so that the distance…