[IPython-User] qtconsole ignoring subplot spacing widths

Joon Ro joonpyro@gmail....
Mon Jan 30 18:36:31 CST 2012


Fernando,

Thanks for your help as always!

-Joon

On Mon, 30 Jan 2012 00:54:36 -0600, Fernando Perez <fperez.net@gmail.com>  
wrote:

> On Sun, Jan 29, 2012 at 7:55 PM, Joon Ro <joonpyro@gmail.com> wrote:
>> 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:
>> http://matplotlib.sourceforge.net/pyplots/text_commands.py
>>
>> Also the suptitle is not showing.
>
> It's actually a matplotlib bug, we discussed it today on the mpl-dev  
> list:
>
> https://github.com/matplotlib/matplotlib/issues/688
>
> Jae-Joon jumped on it and now there's a PR for it, I've just reviewed
> it and confirmed that it fixes the problem:
>
> https://github.com/matplotlib/matplotlib/pull/689
>
> In the meantime, you can work around the issue by editing in IPython
> the file IPython/core/pylabtools.py, and changing line 105 from
>
>         fig.canvas.print_figure(bytes_io, format=fmt,  
> bbox_inches='tight')
>
> to:
>
>         fig.canvas.print_figure(bytes_io, format=fmt)
>
> This may cause too much whitespace in other circumstances, which is
> why we use it, but it will work around the matplotlib issue.
>
> Hopefully we'll merge this soon in MPL and you can then update that,
> which is the proper fix.
>
> Best,
>
> f


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


More information about the IPython-User mailing list