[IPython-User] qtconsole ignoring subplot spacing widths

Thomas Wiecki thomas.wiecki@googlemail....
Fri Jan 27 07:10:18 CST 2012

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:


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

More information about the IPython-User mailing list