[R] New user help with plot.default
PaulGaskell
p.gaskell at sheffield.ac.uk
Thu Aug 2 14:08:56 CEST 2007
Hi - I'm just starting out with R and have come up against a problem with
what should be a simple operation. I'm plotting a range of safety standards
for 7 different chemicals. I don't want the standard box and whisker plot -
I just a dot for each value. Whilst using "plot.default" I get the error
"invalid xlim value" - which is confusing since using the same script with
"plot" does not produce this error. However, I do notice that only alternate
xlim tick mark labels appear when using "plot". Therefore, a question in 2
parts - firstly what is incompatible about my xlim argument with
plot.default and secondly, how do I suppress the "check.overlap" for tick
mark labels in plot.default?
Annotated script below (data file also uploaded in case its useful) and
thanks in advance for any help:
#dataframe is column of numerical values of chemical safety guidelines "SQG"
plus a column identifying the chemicals to which each value pertains i.e.
# SQG Chemical
#1 0.07918 Cd
#2 -0.15490 Cd
#3 -0.15490 Cd
#4 0.95904 Cd
#5....etc. etc.
#assign correct plotting order for each chemical level
OrderedLevels<-factor(Chemical,levels=c("Cd", "Cu", "Zn", "Phen", "Ant",
"Flu", "Pyr", "Tot"))
#set axis label and tick mark label font sizes to be readable when pasted
into final document
par(cex.lab=1.2,cex.axis=1.3)
#produce plot with plotting symbols of round black dots with cex multiplier
of 1.5
plot.default(SQG~OrderedLevels,cex=1.5,pch=16,col=1,xlim=c("Cd","Cu","Zn","Phe","Ant","Flu","Pyr","Tot"),xlab
= "Chemical",ylab = expression(paste(" ",Log[10]," metal ("*m*g*~kg^{-1},")
or PAH ("*mu*g*~kg^{-1},") SQG")))
http://www.nabble.com/file/p11963282/TELrange.csv TELrange.csv
--
View this message in context: http://www.nabble.com/New-user-help-with-plot.default-tf4205767.html#a11963282
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list