Re: [Matplotlib-users] Feature Request: RectangleSelector BlockingInput
Hi, Sorry for the long delay - I have been on vacation. I don't use the imcrop function, but it looks fairly easy to implement using ginput. I am heading off for vacation again for another two weeks and I want to get in some of the changes I proposed a long while ago before working on this, so it might be a while, but if no one can take it on first, I can give a look next month. Cheers, David On Tue, 2008-08-05 at 19:51 -0500, John Hunter wrote: On Tue, Aug 5, 2008 at 6:26 PM, Elfnor [EMAIL PROTECTED] wrote: This would be really useful for implementing a user image crop function, similar to matlab's imcrop for example. David, since you are a recent matlab user and are deeply versed in the blocking code: how hard would it be to simply provide a (mostly) matlab compatible imcrop function, and is this something you are interested in doing? JDH -- ** David M. Kaplan Charge de Recherche 1 Institut de Recherche pour le Developpement Centre de Recherche Halieutique Mediterraneenne et Tropicale av. Jean Monnet B.P. 171 34203 Sete cedex France Phone: +33 (0)4 99 57 32 27 Fax: +33 (0)4 99 57 32 95 http://www.ur097.ird.fr/team/dkaplan/index.html ** - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] error with text object properties using matplotlib 0.98.1
Hi, Thanks for the suggestions. I have stopped using the usetex option. To make math and normal text match, I tried the following: rcParams['font.family'] = 'serif' rcParams['mathtext.fontset'] = 'stix' This didn't make them match - normal text looked to me like it was still sans-serif, while mathtext was with serif. Is there something else I should be doing to make this happen? Thanks again for your help. Cheers, David On Thu, 2008-07-10 at 11:52 -0400, Darren Dale wrote: Hi David, On Thursday 10 July 2008 11:15:37 am David M. Kaplan wrote: 2) I have noticed that the font used for the xticklabels and the font used for the xlabel and contour labels appears to be different (example attached). One appears to be serif and the other sans-serif. This seems to be due to using tex for text rendering. I am not sure if this also occurred before the update, but I didn't notice it previously. It has always been this way. We tried a workaround once a couple years back and it turned into a real mess. Looking at the properties of the different text objects, it isn't apparent that there should be a difference - both have font properties that indicate sans-serif, but the text of tick labels appears to be surrounded by $'s forcing it through the text parser, while that of the contour labels is not. Is this difference normal or expected? Is there a way around this? In particular, I would like to use sans-serif for everything - is this possible while still using tex? I think there is a package, sansmath or something like that, that will allow latex to use sans-serif fonts in math mode. You could try adding it to the text.latex.preamble rc setting, but that option is not officially supported. If you don't like the limitations of latex, you might want to turning off usetex and just use matplotlibs mathtext, which recently got a significant rewrite and is now quite capable thanks to Mike Droettboom. Here's some documentation too: http://matplotlib.sourceforge.net/doc/html/users/mathtext.html Darren -- ** David M. Kaplan Charge de Recherche 1 Institut de Recherche pour le Developpement Centre de Recherche Halieutique Mediterraneenne et Tropicale av. Jean Monnet B.P. 171 34203 Sete cedex France Phone: +33 (0)4 99 57 32 27 Fax: +33 (0)4 99 57 32 95 http://www.ur097.ird.fr/team/dkaplan/index.html ** -- ** David M. Kaplan Assistant Researcher UCSC / Institute of Marine Sciences Ocean Sciences 1156 High St. SC, CA 95064 Phone: 831-459-4789 Fax: 831-459-4882 http://pmc.ucsc.edu/~dmk/ ** - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] error with text object properties using matplotlib 0.98.1
Hi, I gave this a shot, but it didn't print anything out. Attached is an example of a plot where the fonts don't match. In [4]: rcParams['verbose.level']='debug-annoying' In [5]: rcParams['mathtext.fontset'] = 'stix' In [6]: rcParams['font.family'] = 'serif' In [7]: plot(arange(10)) Out[7]: [matplotlib.lines.Line2D object at 0x92b162c] In [8]: text(1,7,r'$1 \alpha$') Out[8]: matplotlib.text.Text object at 0x8f047cc In [9]: text(1,3,'1 alpha') Out[9]: matplotlib.text.Text object at 0x92c4c0c In [10]: savefig('test.eps') Thanks, David On Fri, 2008-07-11 at 09:35 -0400, Michael Droettboom wrote: This works for me. Could you set the rcParam verbose.level to debug-annoying and send the output -- that will print some information about where it's looking for fonts and what it can and can not find. Cheers, Mike David M. Kaplan wrote: Hi, Thanks for the suggestions. I have stopped using the usetex option. To make math and normal text match, I tried the following: rcParams['font.family'] = 'serif' rcParams['mathtext.fontset'] = 'stix' This didn't make them match - normal text looked to me like it was still sans-serif, while mathtext was with serif. Is there something else I should be doing to make this happen? Thanks again for your help. Cheers, David On Thu, 2008-07-10 at 11:52 -0400, Darren Dale wrote: Hi David, On Thursday 10 July 2008 11:15:37 am David M. Kaplan wrote: 2) I have noticed that the font used for the xticklabels and the font used for the xlabel and contour labels appears to be different (example attached). One appears to be serif and the other sans-serif. This seems to be due to using tex for text rendering. I am not sure if this also occurred before the update, but I didn't notice it previously. It has always been this way. We tried a workaround once a couple years back and it turned into a real mess. Looking at the properties of the different text objects, it isn't apparent that there should be a difference - both have font properties that indicate sans-serif, but the text of tick labels appears to be surrounded by $'s forcing it through the text parser, while that of the contour labels is not. Is this difference normal or expected? Is there a way around this? In particular, I would like to use sans-serif for everything - is this possible while still using tex? I think there is a package, sansmath or something like that, that will allow latex to use sans-serif fonts in math mode. You could try adding it to the text.latex.preamble rc setting, but that option is not officially supported. If you don't like the limitations of latex, you might want to turning off usetex and just use matplotlibs mathtext, which recently got a significant rewrite and is now quite capable thanks to Mike Droettboom. Here's some documentation too: http://matplotlib.sourceforge.net/doc/html/users/mathtext.html Darren -- ** David M. Kaplan Assistant Researcher UCSC / Institute of Marine Sciences Ocean Sciences 1156 High St. SC, CA 95064 Phone: 831-459-4789 Fax: 831-459-4882 http://pmc.ucsc.edu/~dmk/ ** attachment: test.eps- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] error with text object properties using matplotlib 0.98.1
Hi, Thanks for the suggestions. I have stopped using the usetex option. To make math and normal text match, I tried the following: rcParams['font.family'] = 'serif' rcParams['mathtext.fontset'] = 'stix' This didn't make them match - normal text looked to me like it was still sans-serif, while mathtext was with serif. Is there something else I should be doing to make this happen? Thanks again for your help. Cheers, David On Thu, 2008-07-10 at 11:52 -0400, Darren Dale wrote: Hi David, On Thursday 10 July 2008 11:15:37 am David M. Kaplan wrote: 2) I have noticed that the font used for the xticklabels and the font used for the xlabel and contour labels appears to be different (example attached). One appears to be serif and the other sans-serif. This seems to be due to using tex for text rendering. I am not sure if this also occurred before the update, but I didn't notice it previously. It has always been this way. We tried a workaround once a couple years back and it turned into a real mess. Looking at the properties of the different text objects, it isn't apparent that there should be a difference - both have font properties that indicate sans-serif, but the text of tick labels appears to be surrounded by $'s forcing it through the text parser, while that of the contour labels is not. Is this difference normal or expected? Is there a way around this? In particular, I would like to use sans-serif for everything - is this possible while still using tex? I think there is a package, sansmath or something like that, that will allow latex to use sans-serif fonts in math mode. You could try adding it to the text.latex.preamble rc setting, but that option is not officially supported. If you don't like the limitations of latex, you might want to turning off usetex and just use matplotlibs mathtext, which recently got a significant rewrite and is now quite capable thanks to Mike Droettboom. Here's some documentation too: http://matplotlib.sourceforge.net/doc/html/users/mathtext.html Darren -- ** David M. Kaplan Charge de Recherche 1 Institut de Recherche pour le Developpement Centre de Recherche Halieutique Mediterraneenne et Tropicale av. Jean Monnet B.P. 171 34203 Sete cedex France Phone: +33 (0)4 99 57 32 27 Fax: +33 (0)4 99 57 32 95 http://www.ur097.ird.fr/team/dkaplan/index.html ** - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users