Jonas Hal
2012-Aug-10 10:05 UTC
[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 _________________________________________________________________________________________________________________________________________ BRFkredit sender e-mails og vedhaeftede dokumenter i ikke-krypteret form. Hvis du ikke ?nsker at modtage oplysninger fra BRFkredit pr. e-mail, beder vi dig meddele os det via brev eller e-mail. Denne e-mail kan indeholde fortrolig information. Hvis du modtager e-mailen ved en fejl, beder vi dig informere os om det hurtigst muligt. Samtidig beder vi dig slette e-mailen uden at videresende eller kopiere indholdet. _________________________________________________________________________________________________________________________________________ [[alternative HTML version deleted]]
John Kane
2012-Aug-10 14:06 UTC
[R] ggplot2 geom_bar produces white slashes in legend keys
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