ligges@statistik.uni-dortmund.de
2001-Sep-27 08:36 UTC
[Rd] ugly in plotmath: frac(1, sqrt(...)) (PR#1101)
Sometimes (dependent on device and settings of 'cex' and 'lwd') the line of a square root symbol plottet in the denominator of a fraction appears to be in or above the line of the fraction. Examples: ### Choose one of these: # pdf("test.pdf", height=6, width=8) # bmp("test.bmp", width=1100, height=800, pointsize=12) # bitmap("test.tif", type="tiff24nc", width=12, height=9, res=300, pointsize=12) # png("test.png", width=1100, height=800, pointsize=12) # postscript("test.eps", height=6, width=8, horizontal=FALSE) par(cex=2, lwd=2) plot(1:10) text(2, 8, expression(frac(1, sigma[i]*sqrt(2*pi)))) dev.off() Uwe Ligges [Happens also on Linux, ...] --please do not edit the information below-- Version: platform = i386-pc-mingw32 arch = x86 os = Win32 system = x86, Win32 status = major = 1 minor = 3.1 year = 2001 month = 08 day = 31 language = R Windows NT 4.0 (build 1381) Service Pack 6 Search Path: .GlobalEnv, package:ctest, Autoloads, package:base -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
ligges@statistik.uni-dortmund.de
2001-Oct-03 10:53 UTC
[Rd] ugly in plotmath: frac(1, sqrt(...)) (PR#1101)
ligges@statistik.uni-dortmund.de wrote:> > Sometimes (dependent on device and settings of 'cex' and 'lwd') the line > of a square root symbol plottet in the denominator of a fraction appears > to be in or above the line of the fraction. > > Examples: > > ### Choose one of these: > # pdf("test.pdf", height=6, width=8) > # bmp("test.bmp", width=1100, height=800, pointsize=12) > # bitmap("test.tif", type="tiff24nc", width=12, height=9, res=300, > pointsize=12) > # png("test.png", width=1100, height=800, pointsize=12) > # postscript("test.eps", height=6, width=8, horizontal=FALSE) > > par(cex=2, lwd=2) > plot(1:10) > text(2, 8, expression(frac(1, sigma[i]*sqrt(2*pi)))) > dev.off()After some investigations: In plotmath.c, line 2250 the "the gap between the nucleus and the radical extension" is defined: #define RADICAL_GAP 0.4 It looks like this gap is not added to the hight (or included in the calculations of the hight) of the denominator of a fraction. So the whole denominator is located to close to the fraction bar, if a root is drawn. I don't see, how this can be fixed smartly ... Uwe Ligges -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
ligges@statistik.uni-dortmund.de
2001-Oct-04 09:40 UTC
[Rd] ugly in plotmath: frac(1, sqrt(...)) (PR#1101)
ligges@statistik.uni-dortmund.de wrote:> > ligges@statistik.uni-dortmund.de wrote: > > > > Sometimes (dependent on device and settings of 'cex' and 'lwd') the line > > of a square root symbol plottet in the denominator of a fraction appears > > to be in or above the line of the fraction. > > > > Examples: > > > > ### Choose one of these: > > # pdf("test.pdf", height=6, width=8) > > # bmp("test.bmp", width=1100, height=800, pointsize=12) > > # bitmap("test.tif", type="tiff24nc", width=12, height=9, res=300, > > pointsize=12) > > # png("test.png", width=1100, height=800, pointsize=12) > > # postscript("test.eps", height=6, width=8, horizontal=FALSE) > > > > par(cex=2, lwd=2) > > plot(1:10) > > text(2, 8, expression(frac(1, sigma[i]*sqrt(2*pi)))) > > dev.off() > > After some investigations: > In plotmath.c, line 2250 the "the gap between the nucleus and the > radical extension" is defined: > #define RADICAL_GAP 0.4 > > It looks like this gap is not added to the hight (or included in the > calculations of the hight) of the denominator of a fraction. So the > whole denominator is located to close to the fraction bar, if a root is > drawn. > I don't see, how this can be fixed smartly ...Suggestion for a fix. plotmath.c, lines 2340 ff.: orderBBox = CombineBBoxes(orderBBox, RenderElement(body, draw)); orderBBox = CombineBBoxes(orderBBox, RenderGap(2 * radTrail, draw)); + orderBBox = EnlargeBBox(orderBBox, radGap, 0, 0); SetStyle(style); return orderBBox; Uwe Ligges -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._