【问题标题】:Creating a single figure from a list of figures in matplotlib从 matplotlib 中的图形列表创建单个图形
【发布时间】:2013-07-08 11:46:55
【问题描述】:

假设我有一个数字列表 (figList),如下所示(在 iPython 中生成的输出):

In [25]: figList
Out[25]: [<matplotlib.figure.Figure at 0x63a8d90>,
 <matplotlib.figure.Figure at 0x638e3f0>,
 <matplotlib.figure.Figure at 0x6669710>,
 <matplotlib.figure.Figure at 0x69daeb0>,
 <matplotlib.figure.Figure at 0x63a43f0>,
 <matplotlib.figure.Figure at 0x6488ad0>,
 <matplotlib.figure.Figure at 0x735f6d0>,
 <matplotlib.figure.Figure at 0x79f41b0>,
 <matplotlib.figure.Figure at 0x7848090>]

我希望能够使用 figList 生成一个图形,该图形由一组子图组成,每个子图对应于 figList 的一个元素。

我该怎么做?

【问题讨论】:

  • 很难在图形之间移动轴,这是您想要做的。最好重构用于生成此列表的代码,以使函数将轴作为参数,然后绘制到这些轴。

标签: python matplotlib ipython


【解决方案1】:

好吧,如果 python matplotlib 不起作用,你可以写出图像,然后使用 imagemagick 合并绘图并按照你想要的方式调整它的大小。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-01-06
    • 2012-03-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-09-30
    • 1970-01-01
    相关资源
    最近更新 更多