Matplotlib: make x-axis longer

前端 未结 1 1951
臣服心动
臣服心动 2020-12-17 21:58

In Matplotlib I need to draw a graph with points on the x-axis on each integer between 1 and 5000 and on the y-axis only in a very lim

相关标签:
1条回答
  • 2020-12-17 22:13

    You can always try to specify the dimensions (in inches) of the figure you are creating. Something along the following line might help:

    fig = plt.figure(figsize=(20, 2))
    ax = fig.add_subplot(111)
    ax.plot(x, y)
    

    The figsize takes a tuple of width, height in inches.

    0 讨论(0)
提交回复
热议问题