Modify Legend using ggplot2 in R?

Maybe something like this... dat = data. Frame(x=rnorm(1000)) ggplot(dat,aes(x=x)) + geom_histogram(aes(y=..density..,fill="binwidth=0.5) + stat_function(fun = dnorm, aes(colour= "Density")) + scale_x_continuous('x', limits = c(-4, 4)) + opts(title = "stogram with Overlay") + scale_fill_manual(name="",value="blue") + scale_colour_manual(name="",value="red") + scale_y_continuous('Frequency')+ opts(legend. Key=theme_rect(fill="white",colour="white"))+ opts(legend.

Background = theme_blank()).

Thanks for the comment, but now the legend seems to be split into two legends, and also there are no lines separating the bars of the histogram. – A-A Jul 16 at 22:22 1 Adding colour='black' to geom_histogram outside of aes will bring back the lines on the bars but will add a diagonal line in the legend. There are two legends because that's the way you get what you described in ggplot2, end of story.

If you want extremely fine control over legends, stick to base plotting functions. Ggplot2 is resisting you here because you're trying to create an arguably "bad" legend, or at least an unnecessary one according to the philosophy behind ggplot2. – joran Jul 16 at 22:46 Thank You for your help.

– A-A Jul 16 at 22:49 1 The key=list() argument to xyplot would also allow adjustment of line width in the legend. – DWin Jul 16 at 23:21.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions