Re: [Rd] unexpected behaviour of expression(sum())

From: Deepayan Sarkar <deepayan_at_stat.wisc.edu>
Date: Fri 11 Mar 2005 - 16:53:59 GMT

On Friday 11 March 2005 01:19, Prof Brian Ripley wrote:
> On Thu, 10 Mar 2005, Marc Schwartz wrote:
> > On Thu, 2005-03-10 at 19:57 -0600, Deepayan Sarkar wrote:
> >> I'm seeing inconsistent symbols from the same expression with the
> >> following code:
> >>
> >>
> >> expr = expression(sum(x, 1, n))
> >> plot(1, main = expr, type = "n")
> >> text(1, 1, expr)
> >>
> >>
> >> Moreover, the inconsistency is reversed in r-devel compared to R
> >> 2.0.1. In particular, the main label shows a \bigoplus instead of
> >> \sum in r-devel, and the other way round in 2.0.1. demo(plotmath)
> >> shows \sum in both.
> >>
> >> Can anyone confirm? Is this intended behaviour (though I can't see
> >> how)?
> >
> > No problem in "Version 2.0.1 Patched (2005-03-07)". I get \sum in
> > both places. I do not see anything in the NEWS file suggesting a
> > bug fix for this.
> >
> > I just installed "Version 2.1.0 Under development (unstable)
> > (2005-03-11)" and do not see the problem there either.
> >
> > Both are under FC3.
>
> We need to know both the device and the locale. Assuming this is
> X11, there are two fixes for font selection:

Yes, it's X11, with locale "C". It doesn't happen with postscript (I haven't tried anything else).

I had tried on 3 different machines other than my desktop, but all remotely. Marc's reply suggested that this was a problem with X on my local machine, and I haven't yet had a chance to check on any others.

> o X11() was only scaling its fonts to pointsize if the dpi
> was within 0.5 of 100dpi.
>
> o X11() font selection was looking for any symbol font, and
> sometimes got e.g. bold italic if the server has such a font.
>
> The main title in plot() and text() are asking for different sizes.
> If Deepayan had problems with getting a valid (Adobe symbol-encoded)
> font, this might vary by size which would explain the reported
> differences.
>
> Deepayan: can you please check what symbol fonts you have: the
> pattern in R-devel is
>
> "-adobe-symbol-medium-r-*-*-*-*-*-*-*-*-*-*"
>
> (Ideally we would select on encoding, but that is usually
> 'fontspecific' so not helpful.)

I'm not really sure what I'm looking for, but everything I get seems to be 'fontspecific':

deepayan $ xlsfonts | grep adobe-symbol-medium
-adobe-symbol-medium-r-normal--0-0-0-0-p-0-adobe-fontspecific
-adobe-symbol-medium-r-normal--0-0-100-100-p-0-adobe-fontspecific
-adobe-symbol-medium-r-normal--0-0-75-75-p-0-adobe-fontspecific
-adobe-symbol-medium-r-normal--10-100-75-75-p-61-adobe-fontspecific
-adobe-symbol-medium-r-normal--10-100-75-75-p-61-adobe-fontspecific
-adobe-symbol-medium-r-normal--11-80-100-100-p-61-adobe-fontspecific
-adobe-symbol-medium-r-normal--11-80-100-100-p-61-adobe-fontspecific
-adobe-symbol-medium-r-normal--12-120-75-75-p-74-adobe-fontspecific
-adobe-symbol-medium-r-normal--12-120-75-75-p-74-adobe-fontspecific
-adobe-symbol-medium-r-normal--14-100-100-100-p-85-adobe-fontspecific
-adobe-symbol-medium-r-normal--14-100-100-100-p-85-adobe-fontspecific
-adobe-symbol-medium-r-normal--14-140-75-75-p-85-adobe-fontspecific
-adobe-symbol-medium-r-normal--14-140-75-75-p-85-adobe-fontspecific
-adobe-symbol-medium-r-normal--17-120-100-100-p-95-adobe-fontspecific
-adobe-symbol-medium-r-normal--17-120-100-100-p-95-adobe-fontspecific
-adobe-symbol-medium-r-normal--18-180-75-75-p-107-adobe-fontspecific
-adobe-symbol-medium-r-normal--18-180-75-75-p-107-adobe-fontspecific
-adobe-symbol-medium-r-normal--20-140-100-100-p-107-adobe-fontspecific
-adobe-symbol-medium-r-normal--20-140-100-100-p-107-adobe-fontspecific
-adobe-symbol-medium-r-normal--24-240-75-75-p-142-adobe-fontspecific
-adobe-symbol-medium-r-normal--24-240-75-75-p-142-adobe-fontspecific
-adobe-symbol-medium-r-normal--25-180-100-100-p-142-adobe-fontspecific
-adobe-symbol-medium-r-normal--25-180-100-100-p-142-adobe-fontspecific
-adobe-symbol-medium-r-normal--34-240-100-100-p-191-adobe-fontspecific
-adobe-symbol-medium-r-normal--34-240-100-100-p-191-adobe-fontspecific
-adobe-symbol-medium-r-normal--8-80-75-75-p-51-adobe-fontspecific -adobe-symbol-medium-r-normal--8-80-75-75-p-51-adobe-fontspecific deepayan $

-Deepayan



R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon Mar 14 10:34:08 2005

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 03:21:01 GMT