[R] ggplot2 geom_bar produces white slashes in legend keys

John Kane jrkrideau at inbox.com
Fri Aug 10 16:06:27 CEST 2012


I cannot reproduce this unless you are referring to the white lines between each level of the cut factor.  See http://www.mediafire.com/view/?14k2z7a1x3ln9nh for my results.

Are we using the same ggplot2 version?  See sessionInfo below.

John Kane
Kingston ON Canada

sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: i686-pc-linux-gnu (32-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_CA.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_CA.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=C                 LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods  
[8] base     

other attached packages:
[1] directlabels_2.6   stringr_0.6.1      RColorBrewer_1.0-5 gridExtra_0.9     
[5] plyr_1.7.1         reshape2_1.2.1     scales_0.2.1       ggplot2_0.9.1     

loaded via a namespace (and not attached):
[1] colorspace_1.1-1 dichromat_1.2-4  digest_0.5.2     labeling_0.1    
[5] MASS_7.3-20      memoise_0.1      munsell_0.3      proto_0.3-9.2   



> -----Original Message-----
> From: joh at brf.dk
> Sent: Fri, 10 Aug 2012 10:05:32 +0000
> To: r-help at r-project.org
> Subject: [R] ggplot2 geom_bar produces white slashes in legend keys
> 
> When I am using geom_bar I get these white slashes through the legend
> keys. I cannot figure out how to remove them.
> ggplot(diamonds, aes(clarity, fill=cut)) + geom_bar()
> 
> I have tried using opts(legend.key = theme_blank()) but with no luck.
> 
> Any suggestions would be much appreciated.
> 
> I am using R vers. 2.15.0 and ggplot 0.9.1, win xp
> 
> Best wishes
> Jonas Hal

____________________________________________________________
GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at http://www.inbox.com/smileys
Works with AIM®, MSN® Messenger, Yahoo!® Messenger, ICQ®, Google Talk™ and most webmails



More information about the R-help mailing list