[R] lattice: How to display no box but only a y-axis on the left + Thicker lines

lith minilith at gmail.com
Wed Sep 16 17:37:32 CEST 2009


Hi,

I have two somewhat embarassing questions about the lattice-related
plot functions:

1.) How do I make lattice (e.g. barchart) to not draw a box but only a
y-axis on the left hand side so that the plot looks like barplot with
default settings? So that the following two code snippets look more
alike:

barplot(VADeaths)

library(reshape)
vad <- melt(data.frame(VADeaths, Age=rownames(VADeaths)), id="Age")
barchart(value ~ variable, groups=Age, horizontal=FALSE, stack=TRUE,
data=vad)

2.) What is the proper way to make lines in xyplots thicker? When I
set lwd=2, I get thicker lines but in conjunction with lty=1:n they
also look somewhat ugly which makes me wonder if I'm doing something
wrong.

I guess both questions are newbie questions and the information should
be easily available somewhere. Unfortunately I wasn't able to find the
answer to these questions myself.

Regards,
Tom




More information about the R-help mailing list