How do I let my matplotlib plot go beyond the axes?

前端 未结 3 1869
太阳男子
太阳男子 2020-12-30 21:53

I have to translate an image plotting script from matlab to matplotlib/pylab, and I\'m trying to achieve the same effect as the matlab image below:

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2020-12-30 22:05

    This is a complete example of how to use the zorder kwarg: http://matplotlib.sourceforge.net/examples/pylab_examples/zorder_demo.html
    Note that a higher z-order equates to a graph-element being more in the foreground.

    For your second question, have a look at the figsize kwarg to instances of the Figure class: http://matplotlib.sourceforge.net/api/figure_api.html?highlight=figsize#matplotlib.figure.Figure

    If you run into issues, please post some of your code and we'll be able to give more-detailed recommendations. Best of luck.

提交回复
热议问题