From ligges at statistik.uni-dortmund.de  Thu Aug  7 09:43:05 2003
From: ligges at statistik.uni-dortmund.de (ligges@statistik.uni-dortmund.de)
Date: Thu Aug  7 08:42:45 2003
Subject: [Rd] plotmath under windows (PR#3672)
Message-ID: <200308070643.h776h5JH004448@pubhealth.ku.dk>

mh.smith@niwa.co.nz wrote:

> Full_Name: Murray H Smith
> Version: 1.7.1
> OS: Windows2000
> Submission from: (NULL) (202.36.29.1)
> 

I don't see any difference either difference using win.metafile() with 
its defaults on WinNT 4.0, R-1.7.1. Please start R with --vanilla and 
process your code again. Does it still happen?

Uwe Ligges


> This alleged bug is Windows specific and occurs when using Windows metafile
> plots. 
> The problem does not occur in a Linux version.
> It does not occur in the pt rintout when a graphic is saved to a postscript file
> under Windows.
> 
> The problem came to light when using plotmath to label a plot with latitudes
> containing degree symbols. 
> 
> If expression(40 * degree) is used it is written on the default line for
> labels.
> 
> If expression(paste(40 * degree, " S") is used it displced closer to the axis.
> Pasting any character (except "") has this effect.
> 
> The following code illustrates the problem.
> 
> par(mfrow =c(3,2))
> 
> 	# plotmath not used
> plot(seq(-41, -40, 0.5), c(0, 1, 0), type = "n", xlab = "latitude", ylab = "",
> xaxt = "n", yaxt = "n")
> axis(1, at = seq(-41, -40, 0.5), 
> 	labels = seq(41 , 40, -0.5))
> 	
> 	# plotmath not used but characters pasted into labels
> plot(seq(-41, -40, 0.5), c(0, 1, 0), type = "n", xlab = "latitude", ylab = "",
> xaxt = "n", yaxt = "n")
> axis(1, at = seq(-41, -40, 0.5), 
> 	labels = paste(seq(41, 40, -0.5), "S"))
> 
> 	# last label has no character component
> plot(seq(-41, -40, 0.5), c(0, 1, 0), type = "n", xlab = "latitude", ylab = "",
> xaxt = "n", yaxt = "n")
> axis(1, at = seq(-41, -40, 0.5), 
> 	labels = expression(paste(41 * degree, " S"), paste(40 * degree, " ", 30 *
> minute), 40 * degree))
> 
> 	# last label has no plotmath component
> plot(seq(-41, -40, 0.5), c(0, 1, 0), type = "n", xlab = "latitude", ylab = "",
> xaxt = "n", yaxt = "n")
> axis(1, at = seq(-41, -40, 0.5), 
> 	labels = expression(paste(41 * degree, " S"), paste(40 * degree, " ", 30 *
> minute), 40))
> 
> 	# last label has null character component
> plot(seq(-41, -40, 0.5), c(0, 1, 0), type = "n", xlab = "latitude", ylab = "",
> xaxt = "n", yaxt = "n")
> axis(1, at = seq(-41, -40, 0.5), 
> 	labels = expression(paste(41 * degree, " S"), paste(40 * degree, " ", 30 *
> minute), paste(40 * degree,  "")))
> 
> 	# last label has spaces character component
> plot(seq(-41, -40, 0.5), c(0, 1, 0), type = "n", xlab = "latitude", ylab = "",
> xaxt = "n", yaxt = "n")
> axis(1, at = seq(-41, -40, 0.5), 
> 	labels = expression(paste(41 * degree, " S"), paste(40 * degree, " ", 30 *
> minute), paste(" ", 40 * degree, " ")))
> 
> par(mfrow =c(1,1))
> 
> ______________________________________________
> R-devel@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-devel


[Rd] plotmath under windows (PR#3672)
ligges@statistik.uni-dortmund.de