Re: [Matplotlib-users] Mathtext + stixsans weird baseline

2010-04-15 Thread Ryan May
I'm having a problem with the rendering of stixsans fonts again. Not
as bad as the baseline before, but some odd text placement:

import matplotlib.pyplot as plt
from matplotlib import rcParams
rcParams['font.size'] = 8.0
rcParams['mathtext.default'] = 'regular'
rcParams['mathtext.fontset'] = 'stixsans'
fig = plt.figure(dpi=100)
plt.text(0.5,0.5,'$Velocity \,Spectrum \, (m \,s^{-1})$')
plt.show()

I've attached images from both the 'regular' setting above and for
'mathtext.default' set to 'rm', which actually makes things
worse. It's also quite noticable for larger font sizes with 'rm'.

Thoughts?

Ryan

On Wed, Feb 25, 2009 at 4:13 PM, Ryan May rma...@gmail.com wrote:
 Hi,

 When I combine mathtext with the stixsans fonts while mathtext.default is
 set to 'regular', horizontal text is not vertically aligned properly, like
 the baseline is moving.  I've attached an image of what I see when I run the
 following code.  It should be noted that I don't see anything like this on
 the vertical axis, and it all goes away if I stop using mathtext.

 import matplotlib.pyplot as plt
 from matplotlib import rcParams
 rcParams['font.size'] = 12.0
 rcParams['mathtext.default'] = 'regular'
 rcParams['mathtext.fontset'] = 'stixsans'

 fig = plt.figure()

 plt.xlabel('ItLooksToMeLikeTheBaselineMoves $(g m^{-3})$')
 plt.ylabel('ItLooksToMeLikeTheBaselineMoves $(db km^{-1})$')
 plt.show()


 Thoughts? Am I doing something bad?  Can anyone else reproduce this?

 Ryan

 --
 Ryan May
 Graduate Research Assistant
 School of Meteorology
 University of Oklahoma
 Sent from: Norman Oklahoma United States.




-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
attachment: odd_placement_regular.pngattachment: odd_placement_rm.png--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Mathtext + stixsans weird baseline

2009-02-27 Thread Michael Droettboom
It seems the Freetype rendering backend wasn't doing subpixel alignment 
on the text, but was being rounded to the nearest pixels.  Taking the 
fractional part into account seems to resolve this.  Fixed on branch and 
trunk.

Mike

Ryan May wrote:
 And here's the image I promised.

 On Wed, Feb 25, 2009 at 3:13 PM, Ryan May rma...@gmail.com 
 mailto:rma...@gmail.com wrote:

 Hi,

 When I combine mathtext with the stixsans fonts while
 mathtext.default is set to 'regular', horizontal text is not
 vertically aligned properly, like the baseline is moving.  I've
 attached an image of what I see when I run the following code.  It
 should be noted that I don't see anything like this on the
 vertical axis, and it all goes away if I stop using mathtext.

 import matplotlib.pyplot as plt
 from matplotlib import rcParams
 rcParams['font.size'] = 12.0
 rcParams['mathtext.default'] = 'regular'
 rcParams['mathtext.fontset'] = 'stixsans'

 fig = plt.figure()

 plt.xlabel('ItLooksToMeLikeTheBaselineMoves $(g m^{-3})$')
 plt.ylabel('ItLooksToMeLikeTheBaselineMoves $(db km^{-1})$')
 plt.show()


 Thoughts? Am I doing something bad?  Can anyone else reproduce this?

 Ryan

 -- 
 Ryan May
 Graduate Research Assistant
 School of Meteorology
 University of Oklahoma
 Sent from: Norman Oklahoma United States. 




 -- 
 Ryan May
 Graduate Research Assistant
 School of Meteorology
 University of Oklahoma
 Sent from: Norman Oklahoma United States.
 

 

 --
 Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
 -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
 -Strategies to boost innovation and cut costs with open source participation
 -Receive a $600 discount off the registration fee with the source code: SFAD
 http://p.sf.net/sfu/XcvMzF8H
 

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

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Mathtext + stixsans weird baseline

2009-02-25 Thread Ryan May
Hi,

When I combine mathtext with the stixsans fonts while mathtext.default is
set to 'regular', horizontal text is not vertically aligned properly, like
the baseline is moving.  I've attached an image of what I see when I run the
following code.  It should be noted that I don't see anything like this on
the vertical axis, and it all goes away if I stop using mathtext.

import matplotlib.pyplot as plt
from matplotlib import rcParams
rcParams['font.size'] = 12.0
rcParams['mathtext.default'] = 'regular'
rcParams['mathtext.fontset'] = 'stixsans'

fig = plt.figure()

plt.xlabel('ItLooksToMeLikeTheBaselineMoves $(g m^{-3})$')
plt.ylabel('ItLooksToMeLikeTheBaselineMoves $(db km^{-1})$')
plt.show()


Thoughts? Am I doing something bad?  Can anyone else reproduce this?

Ryan

-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from: Norman Oklahoma United States.
--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Mathtext + stixsans weird baseline

2009-02-25 Thread Ryan May
And here's the image I promised.

On Wed, Feb 25, 2009 at 3:13 PM, Ryan May rma...@gmail.com wrote:

 Hi,

 When I combine mathtext with the stixsans fonts while mathtext.default is
 set to 'regular', horizontal text is not vertically aligned properly, like
 the baseline is moving.  I've attached an image of what I see when I run the
 following code.  It should be noted that I don't see anything like this on
 the vertical axis, and it all goes away if I stop using mathtext.

 import matplotlib.pyplot as plt
 from matplotlib import rcParams
 rcParams['font.size'] = 12.0
 rcParams['mathtext.default'] = 'regular'
 rcParams['mathtext.fontset'] = 'stixsans'

 fig = plt.figure()

 plt.xlabel('ItLooksToMeLikeTheBaselineMoves $(g m^{-3})$')
 plt.ylabel('ItLooksToMeLikeTheBaselineMoves $(db km^{-1})$')
 plt.show()


 Thoughts? Am I doing something bad?  Can anyone else reproduce this?

 Ryan

 --
 Ryan May
 Graduate Research Assistant
 School of Meteorology
 University of Oklahoma
 Sent from: Norman Oklahoma United States.




-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from: Norman Oklahoma United States.
attachment: weird_font.png--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users