1

image

Kindly follow the link above to see the output of graph and code

My data starts from 1995 but as the graph output shows there is a gap between origin point on x-axis and 1995, shouldn't 1995 taken as the origin point? If so, how do i change/set the origin point here

image

enamoria
  • 896
  • 2
  • 11
  • 29
  • By default, `matplotlib` leaves a little bit space between the origin and the lowest data point (same goes for the upper right edge). You can change that with `plt.gca().set_xlim()` and `plt.gca().set_ylim()`. See the [documentation](https://matplotlib.org/api/_as_gen/matplotlib.axes.Axes.set_xlim.html) for details. – Thomas Kühn Dec 19 '18 at 06:46
  • set limits accordingly , by default it leave some space – classicdude7 Dec 19 '18 at 07:16

0 Answers0