[IPython-User] qtconsole ignoring subplot spacing widths

Joon Ro joonpyro@gmail....
Sun Jan 29 21:55:22 CST 2012

I actually have been struggling with this for several days.
Whatever I do, when I have subplots I cannot make it show suptitle.

I just tried the following in my notebook,

> plt.plot([1,2,3])
> plt.suptitle('foo')
> plt.subplots_adjust(top=.5)

and there is no suptitle.
When I run an example in matplotlib:

Also the suptitle is not showing.


On Fri, 27 Jan 2012 07:10:18 -0600, Thomas Wiecki  
<thomas.wiecki@googlemail.com> wrote:

> Sorry, I think I didn't post this to the list:
> hspace and wspace seem to work, but e.g. top produces an odd behavior.
> Execute the same code with inlining in the qtconsole and one with
> ipython without inlining:
> plt.plot([1,2,3])
> plt.suptitle('foo')
> plt.subplots_adjust(top=.5)
> As you might see, the subplot is scaled, but the extra top space is
> not displayed (and the suptitle is lost). It seems inlining is
> removing the figure and only displaying the axis.
> Can anyone reproduce this?
>> On Mon, Jan 16, 2012 at 3:03 PM, Fernando Perez <fperez.net@gmail.com>  
>> wrote:
>>> On Mon, Jan 16, 2012 at 3:47 AM, Thomas Wiecki
>>> <thomas.wiecki@googlemail.com> wrote:
>>>> With qtconsole inlining enabled the fig.subplots_adjust() settings are
>>>> ignored it seems. Is this a bug?
>>> No, it works fine but you have to create the figure and render it in a
>>> single cell.  In inline mode, the figure is closed once rendered, so
>>> you must make all the adjustments to the figure in the cell you create
>>> it:
>>> In [9]: f, (a1, a2) = subplots(2, 1)
>>>   ...: f.subplots_adjust(hspace=10)
>>> Now, you can change this closing behavior either at runtime with
>>> %config InlineBackend.close_figures = False
>>> or by setting this permanently in your config file.
>>> This is explained in the console docs here:
>>> http://ipython.org/ipython-doc/stable/interactive/qtconsole.html
>>> Cheers,
>>> f
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user

Using Opera's revolutionary email client: http://www.opera.com/mail/

More information about the IPython-User mailing list