[R] ggarrange & legend

2024-02-05 Thread SIBYLLE STÖCKLI via R-help
Dear R community It is possible to adjust the legend in combined ggplots using ggarrange with be positions top, bottom, left and right. My question: Is there a function to change the position of the legend to topright or bottomleft? Right and top etc are in the middle of the axis. Kind regards Si

[R] DrDimont package in R

2024-02-05 Thread Anas Jamshed
[[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 com

Re: [R] DrDimont package in R

2024-02-05 Thread John Kane
Nothing got through. Try plain text rather than HTML. On Mon, 5 Feb 2024 at 06:04, Anas Jamshed wrote: > > > [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch

Re: [R] ggarrange & legend

2024-02-05 Thread John Kane
Could you supply us with a MWE (minimal working example)of what you have so far? Thanks. On Mon, 5 Feb 2024 at 05:00, SIBYLLE STÖCKLI via R-help < r-help@r-project.org> wrote: > Dear R community > > It is possible to adjust the legend in combined ggplots using ggarrange > with > be positions top,

Re: [R] ggarrange & legend

2024-02-05 Thread SIBYLLE STÖCKLI via R-help
Dear John Kane Dear R community Here my working example 1. Example that is working with legend=”top”. However, as mentioned, the legend is in the middle of the top axis. mylist<-list(p1, p2) dev.new(width=28, height=18) fig1<- ggarrange(plotlist=mylist, common.legend = TRUE, legend=

Re: [R] ggarrange & legend

2024-02-05 Thread John Kane
I'm sorry but that is not a working example. A working example needs to create the plots being used. For example, stealing some code from https://rpkgs.datanovia.com/ggpubr/reference/ggarrange.html #= data

Re: [R] ggarrange & legend

2024-02-05 Thread Ebert,Timothy Aaron
Would something like this help? library(ggplot2) # Create a plot p <- ggplot(mtcars, aes(x = wt, y = mpg)) + geom_point() + labs(title = "Scatter Plot", x = "Weight", y = "Miles Per Gallon") # Add text at a specific location p + annotate("text", x = min(mtcars$wt) + 23, y = max(mtcars$mpg) -

Re: [R] ggarrange & legend

2024-02-05 Thread John Kane
Blast it hit send by accident. Anyway the code above is a WWE. I don't see any obvious way no move the legend On Mon, 5 Feb 2024 at 09:13, John Kane wrote: > I'm sorry but that is not a working example. > > A working example needs to create the plots being used. > > For example, stealing some