Dear R-users,

i encountered some problems when trying to adjust the line width of the 
axes and stripes in a plot created with ggplot2.
I use the "barley" dataset of the lattice package to illustrate my problem:


library(ggplot2)
library(lattice)
barley[["SD"]] <- 5

limits <- aes(ymax=barley$yield + barley$SD,ymin=barley$yield - barley$SD)


p1 <- ggplot(barley,aes(fill=year,y=yield,x=variety))
p2 <- p1 + geom_bar(position="dodge",stat="identity")

dodge <- position_dodge(width=0.9)
p3 <- p2 + geom_errorbar(limits,position=dodge,width=0.5,size=0.7) 
p4 <- p3 + facet_wrap(~site,ncol=2)
p5 <- p4+theme_bw(base_size=16) 
p5

last_plot() + opts(panel.grid.minor=theme_blank()) # deletes the minor grid 
lines 

## Now i would like to increase the width of all remaining lines (bottom, 
left, top, right border of all panels and stripes) in the plot, as a 
certain minimum lines width is required by many journals

last_plot() + 
opts(panel.grid.major=theme_line(colour="darkgrey",size=0.71))
# that works fine
last_plot() + opts(panel.border=theme_rect(colour="black",size=0.71))
# that only changes the bottom and right border of the panel
last_plot() + 
opts(strip.background=theme_rect(colour="black",fill="grey90",size=0.71))
# that only changes the bottom and right border of the stripes
last_plot() + opts(axis.line=theme_segment(size=0.71))
# trying to increase the line width of the left border of the panel, i.e. 
the y-axis,
# however, that changes only the y-axis of the left column of panels, not 
of the right column

Thanks for any hints on how to increase the line width of the borders of 
panels and stripes in this plot!

Henning
    
-- 



        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to