Re: [Matplotlib-users] overwriting suptitle?

2012-09-18 Thread Damon McDougall
On Sun, Sep 16, 2012 at 8:38 PM, Eric Firing efir...@hawaii.edu wrote:
 On 2012/09/16 8:54 AM, Benjamin Root wrote:


 On Sun, Sep 16, 2012 at 2:09 PM, Skipper Seabold jsseab...@gmail.com
 mailto:jsseab...@gmail.com wrote:

 Is there a way to overwrite suptitle? When using 3rd party libs that
 return a figure, if they set suptitle and don't give you the text
 object back then you can't overwrite it? This doesn't seem right to
 me.

 
 http://stackoverflow.com/questions/10559144/matplotlib-suptitle-prints-over-old-title

 Skipper


 Correct, this still seems to be the case.  Looking at the code in
 figure.py, the suptitle() function just creates a text object and places
 it at a default location.  Then it simply returns the object without
 saving a reference to it being a figure title.  The only reference kept
 is in the self.texts list that it keeps.  I see no reason why it has to
 be this way, though, and would certainly welcome a patch to fix this
 oversight (would make the code involving bbox_tight to be more simple, I
 think.

 OK, I guess I see the problem now: Figure.suptitle really should be able
 to replace a prior suptitle, and the most straightforward way to
 facilitate this is with an explicit reference kept by the Figure.

 Eric


 Ben Root


 --
 Everyone hates slow websites. So do we.
 Make your web apps faster with AppDynamics
 Download AppDynamics Lite for free today:
 http://ad.doubleclick.net/clk;258768047;13503038;j?
 http://info.appdynamics.com/FreeJavaPerformanceDownload.html



 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users



 --
 Everyone hates slow websites. So do we.
 Make your web apps faster with AppDynamics
 Download AppDynamics Lite for free today:
 http://ad.doubleclick.net/clk;258768047;13503038;j?
 http://info.appdynamics.com/FreeJavaPerformanceDownload.html
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Fixed in https://github.com/matplotlib/matplotlib/pull/1276.

-- 
Damon McDougall
http://www.damon-is-a-geek.com
B2.39
Mathematics Institute
University of Warwick
Coventry
West Midlands
CV4 7AL
United Kingdom

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] overwriting suptitle?

2012-09-16 Thread Skipper Seabold
Is there a way to overwrite suptitle? When using 3rd party libs that
return a figure, if they set suptitle and don't give you the text
object back then you can't overwrite it? This doesn't seem right to
me.

http://stackoverflow.com/questions/10559144/matplotlib-suptitle-prints-over-old-title

Skipper

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] overwriting suptitle?

2012-09-16 Thread Benjamin Root
On Sun, Sep 16, 2012 at 2:09 PM, Skipper Seabold jsseab...@gmail.comwrote:

 Is there a way to overwrite suptitle? When using 3rd party libs that
 return a figure, if they set suptitle and don't give you the text
 object back then you can't overwrite it? This doesn't seem right to
 me.


 http://stackoverflow.com/questions/10559144/matplotlib-suptitle-prints-over-old-title

 Skipper


Correct, this still seems to be the case.  Looking at the code in
figure.py, the suptitle() function just creates a text object and places it
at a default location.  Then it simply returns the object without saving a
reference to it being a figure title.  The only reference kept is in the
self.texts list that it keeps.  I see no reason why it has to be this way,
though, and would certainly welcome a patch to fix this oversight (would
make the code involving bbox_tight to be more simple, I think.

Ben Root
--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] overwriting suptitle?

2012-09-16 Thread Skipper Seabold
On Sun, Sep 16, 2012 at 2:54 PM, Benjamin Root ben.r...@ou.edu wrote:


 On Sun, Sep 16, 2012 at 2:09 PM, Skipper Seabold jsseab...@gmail.com
 wrote:

 Is there a way to overwrite suptitle? When using 3rd party libs that
 return a figure, if they set suptitle and don't give you the text
 object back then you can't overwrite it? This doesn't seem right to
 me.


 http://stackoverflow.com/questions/10559144/matplotlib-suptitle-prints-over-old-title

 Skipper


 Correct, this still seems to be the case.  Looking at the code in figure.py,
 the suptitle() function just creates a text object and places it at a
 default location.  Then it simply returns the object without saving a
 reference to it being a figure title.  The only reference kept is in the
 self.texts list that it keeps.  I see no reason why it has to be this way,
 though, and would certainly welcome a patch to fix this oversight (would
 make the code involving bbox_tight to be more simple, I think.

 Ben Root

Does not reply to the list by default (?), so reposting

Ah, thanks for pointing out the reference in self.texts. I can use
this. I don't have time for a patch now, but I filed this issue.

https://github.com/matplotlib/matplotlib/issues/1262

Skipper

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] overwriting suptitle?

2012-09-16 Thread Eric Firing
On 2012/09/16 8:54 AM, Benjamin Root wrote:


 On Sun, Sep 16, 2012 at 2:09 PM, Skipper Seabold jsseab...@gmail.com
 mailto:jsseab...@gmail.com wrote:

 Is there a way to overwrite suptitle? When using 3rd party libs that
 return a figure, if they set suptitle and don't give you the text
 object back then you can't overwrite it? This doesn't seem right to
 me.

 
 http://stackoverflow.com/questions/10559144/matplotlib-suptitle-prints-over-old-title

 Skipper


 Correct, this still seems to be the case.  Looking at the code in
 figure.py, the suptitle() function just creates a text object and places
 it at a default location.  Then it simply returns the object without
 saving a reference to it being a figure title.  The only reference kept
 is in the self.texts list that it keeps.  I see no reason why it has to
 be this way, though, and would certainly welcome a patch to fix this
 oversight (would make the code involving bbox_tight to be more simple, I
 think.

Why should a reference be kept other than that in self.texts?  Instead 
of keeping track of it somewhere else, would it be sufficient for the 
suptitle method to add a default suptitle label to the text object? 
Is there really anything special about the suptitle compared to any 
other text object that might be placed on the figure?

Eric


 Ben Root



--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] overwriting suptitle?

2012-09-16 Thread Eric Firing
On 2012/09/16 8:54 AM, Benjamin Root wrote:


 On Sun, Sep 16, 2012 at 2:09 PM, Skipper Seabold jsseab...@gmail.com
 mailto:jsseab...@gmail.com wrote:

 Is there a way to overwrite suptitle? When using 3rd party libs that
 return a figure, if they set suptitle and don't give you the text
 object back then you can't overwrite it? This doesn't seem right to
 me.

 
 http://stackoverflow.com/questions/10559144/matplotlib-suptitle-prints-over-old-title

 Skipper


 Correct, this still seems to be the case.  Looking at the code in
 figure.py, the suptitle() function just creates a text object and places
 it at a default location.  Then it simply returns the object without
 saving a reference to it being a figure title.  The only reference kept
 is in the self.texts list that it keeps.  I see no reason why it has to
 be this way, though, and would certainly welcome a patch to fix this
 oversight (would make the code involving bbox_tight to be more simple, I
 think.

OK, I guess I see the problem now: Figure.suptitle really should be able 
to replace a prior suptitle, and the most straightforward way to 
facilitate this is with an explicit reference kept by the Figure.

Eric


 Ben Root


 --
 Everyone hates slow websites. So do we.
 Make your web apps faster with AppDynamics
 Download AppDynamics Lite for free today:
 http://ad.doubleclick.net/clk;258768047;13503038;j?
 http://info.appdynamics.com/FreeJavaPerformanceDownload.html



 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users



--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users