Hi Edin, I am not able to run the example when I have freefont installed in /usr/local/share/fonts (although they are accessible by other programs, so they are installed properly as far as X is concerned), but if I copy the ttf's to the fonts directory in matplotlib's source, and then python setup.py install, I am able to run your example, and have attached the resulting png. Note the line is missing in the 3/2 fraction.
Darren
On Monday 21 August 2006 14:25, you wrote:
> Hmm, it looks like mpl is using the old mathtext which doesn't support
> \frac (mathtext.py) not mathtext2.py. Are you sure you put the
> following
>
> mathtext2: True # Needed to enable the new mathtext
>
> line in your rc file. mathtext2 is disabled by default.
>
> Hopefully I'll try tomorrow the SVN version on a Linux box.
>
> Thanks,
> Edin
>
> On 8/21/06, Darren Dale <[EMAIL PROTECTED]> wrote:
> > Lets take this offlist for now.
> >
> > I just updated from svn, and tried running mathtext2_demo.py. I get the
> > following error:
> >
> > python mathtext2_demo.py
> > Traceback (most recent call last):
> > File "mathtext2_demo.py", line 40, in ?
> > savefig('mathtext_demo.png')
> > File "/usr/lib64/python2.4/site-packages/matplotlib/pylab.py", line
> > 811, in savefig
> > return fig.savefig(*args, **kwargs)
> > File "/usr/lib64/python2.4/site-packages/matplotlib/figure.py", line
> > 671, in savefig
> > self.canvas.print_figure(*args, **kwargs)
> >
> > File
> > "/usr/lib64/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py
> >", line 113, in print_figure
> > orientation, **kwargs)
> >
> > File
> > "/usr/lib64/python2.4/site-packages/matplotlib/backends/backend_agg.py",
> > line 454, in print_figure
> > self.draw()
> >
> > File
> > "/usr/lib64/python2.4/site-packages/matplotlib/backends/backend_agg.py",
> > line 391, in draw
> > self.figure.draw(renderer)
> > File "/usr/lib64/python2.4/site-packages/matplotlib/figure.py", line
> > 534, in draw
> > for a in self.axes: a.draw(renderer)
> > File "/usr/lib64/python2.4/site-packages/matplotlib/axes.py", line
> > 1057, in draw
> > a.draw(renderer)
> > File "/usr/lib64/python2.4/site-packages/matplotlib/text.py", line 339,
> > in draw
> > bbox, info = self._get_layout(renderer)
> > File "/usr/lib64/python2.4/site-packages/matplotlib/text.py", line 186,
> > in _get_layout
> > w,h = renderer.get_text_width_height(
> >
> > File
> > "/usr/lib64/python2.4/site-packages/matplotlib/backends/backend_agg.py",
> > line 244, in get_text_width_height
> > width, height, fonts = math_parse_s_ft2font(
> > File "/usr/lib64/python2.4/site-packages/matplotlib/mathtext.py", line
> > 1579, in __call__
> > handler.expr.set_size_info(fontsize, dpi)
> > File "/usr/lib64/python2.4/site-packages/matplotlib/mathtext.py", line
> > 1195, in set_size_info
> > self.elements[0].set_size_info(self._scale*fontsize, dpi)
> > File "/usr/lib64/python2.4/site-packages/matplotlib/mathtext.py", line
> > 1107, in set_size_info
> > self.metrics = Element.fonts.get_metrics(
> > File "/usr/lib64/python2.4/site-packages/matplotlib/mathtext.py", line
> > 593, in get_metrics
> > cmfont, metrics, glyph, offset = \
> > File "/usr/lib64/python2.4/site-packages/matplotlib/mathtext.py", line
> > 613, in _get_info
> > raise ValueError('unrecognized symbol "%s"' % sym)
> > ValueError: unrecognized symbol "\frac3"
> >
> > On Monday 21 August 2006 06:33, you wrote:
> > > On 8/21/06, Edin Salković <[EMAIL PROTECTED]> wrote:
> > > > If anyone is having problems with finding unicode fonts, check the
> > > > FreeFonts (FreeSerif is the one that has the most characters in it):
> > > > http://download.savannah.gnu.org/releases/freefont/
> > > > http://download.savannah.gnu.org/releases/freefont/freefont-ttf-20060
> > > >126. tar.gz
> > > >
> > > > The only currently supported fonts are True/OpenType.
> > >
> > > Oops. I haven't had updated the _mathtext_data.py file.
> > >
> > > Darren can you check if now everything works properly (even with pfb
> > > fonts)?
> > >
> > > It turns out that mpl now ships with the BaKoMa fonts in the mpl-data
> > > dir, so I though that putting the unicode fonts there would be fine.
> > > I'll see what I can do regarding integrating mathtext2 with the
> > > current font manager.
> > > -----------------------------------------------------------------------
> > >-- Using Tomcat but need to do more? Need to support web services,
> > > security? Get stuff done quickly with pre-integrated technology to make
> > > your job easier Download IBM WebSphere Application Server v.1.0.1 based
> > > on Apache Geronimo
> > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=12164
> > >2 _______________________________________________
> > > Matplotlib-devel mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
> >
> > --
> > Darren S. Dale, Ph.D.
> > Cornell High Energy Synchrotron Source
> > Cornell University
> > 200L Wilson Lab
> > Rt. 366 & Pine Tree Road
> > Ithaca, NY 14853
> >
> > [EMAIL PROTECTED]
> > office: (607) 255-3819
> > fax: (607) 255-9001
--
Darren S. Dale, Ph.D.
Cornell High Energy Synchrotron Source
Cornell University
200L Wilson Lab
Rt. 366 & Pine Tree Road
Ithaca, NY 14853
[EMAIL PROTECTED]
office: (607) 255-3819
fax: (607) 255-9001
mathtext_demo.png
Description: PNG image
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Matplotlib-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
