matplotlib modify autoscaling rules

后端 未结 1 437
闹比i
闹比i 2020-12-12 04:15

when plotting, matplotlib sets automatically the scales from the data content being plotted. But it seems the limits on both axes are always equal to the maxima from the dat

相关标签:
1条回答
  • 2020-12-12 04:47

    (copied almost directly from How to autoscale y axis in matplotlib?)

    You want margins doc

    ex

    ax.margins(y=.1, x=.1)
    

    Also see Add margin when plots run against the edge of the graph

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