Re: [R] geom_ribbon function in ggplot2 package
Thanks, Eik! Eik Vettorazzi 於 2018年12月19日 週三 下午5:12寫道: > Hi, > just add +scale_fill_discrete(name=NULL) > > Cheers > > Am 19.12.2018 um 07:05 schrieb John: > > Hi, > > > > When using the geom_ribbon function in gglot2 package, I got the text > > "fill" above the legend "A" and "B". How can I get rid of the text "fill" > > above the legend? > > > > Thanks! > > > > The code is as follows: > > > > > > df<-data.frame(x=c(1,2), y=c(1,2), z=c(3,5)) > >> ggplot(df, > > > aes(1:2))+geom_ribbon(aes(ymin=0,ymax=df[,"y"],fill="A"),alpha=0.5)+geom_ribbon(aes(ymin=0,ymax=df[,"z"],fill="B"),alpha=0.5) > > > > [[alternative HTML version deleted]] > > > > __ > > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > > 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. > > > > -- > Eik Vettorazzi > > Department of Medical Biometry and Epidemiology > University Medical Center Hamburg-Eppendorf > > Martinistrasse 52 > building W 34 > 20246 Hamburg > > Phone: +49 (0) 40 7410 - 58243 > Fax: +49 (0) 40 7410 - 57790 > Web: www.uke.de/imbe > -- > > _ > > Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen > Rechts; Gerichtsstand: Hamburg | www.uke.de > Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. > Uwe Koch-Gromus, Joachim Prölß, Marya Verdel > _ > > SAVE PAPER - THINK BEFORE PRINTING > [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.
Re: [R] geom_ribbon function in ggplot2 package
Hi, just add +scale_fill_discrete(name=NULL) Cheers Am 19.12.2018 um 07:05 schrieb John: Hi, When using the geom_ribbon function in gglot2 package, I got the text "fill" above the legend "A" and "B". How can I get rid of the text "fill" above the legend? Thanks! The code is as follows: df<-data.frame(x=c(1,2), y=c(1,2), z=c(3,5)) ggplot(df, aes(1:2))+geom_ribbon(aes(ymin=0,ymax=df[,"y"],fill="A"),alpha=0.5)+geom_ribbon(aes(ymin=0,ymax=df[,"z"],fill="B"),alpha=0.5) [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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. -- Eik Vettorazzi Department of Medical Biometry and Epidemiology University Medical Center Hamburg-Eppendorf Martinistrasse 52 building W 34 20246 Hamburg Phone: +49 (0) 40 7410 - 58243 Fax: +49 (0) 40 7410 - 57790 Web: www.uke.de/imbe -- _ Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. Uwe Koch-Gromus, Joachim Prölß, Marya Verdel _ SAVE PAPER - THINK BEFORE PRINTING __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.
[R] geom_ribbon function in ggplot2 package
Hi, When using the geom_ribbon function in gglot2 package, I got the text "fill" above the legend "A" and "B". How can I get rid of the text "fill" above the legend? Thanks! The code is as follows: df<-data.frame(x=c(1,2), y=c(1,2), z=c(3,5)) > ggplot(df, aes(1:2))+geom_ribbon(aes(ymin=0,ymax=df[,"y"],fill="A"),alpha=0.5)+geom_ribbon(aes(ymin=0,ymax=df[,"z"],fill="B"),alpha=0.5) [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.