Then this should work:
```
library(ggplot2)
library(cowplot)
p1 <- ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width)) +
geom_point()
p2 <- ggplot(iris, aes(x = Petal.Length, y = Petal.Width * 1000)) +
geom_point()
plot_grid(p1, p2, ncol = 1, align = "hv", rel_heights = c(2, 1), axis =
"t
On 07/28/2020 12:35 PM, Ulrik Stervbo wrote:
> Would this work:
>
> ```
> library(ggplot2)
> library(cowplot)
>
> p1 <- ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width)) + geom_point()
> p2 <- ggplot(iris, aes(x = Petal.Length, y = Petal.Width * 1000)) +
> geom_point()
>
> plot_grid(p1, p2, nco
Would this work:
```
library(ggplot2)
library(cowplot)
p1 <- ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width)) +
geom_point()
p2 <- ggplot(iris, aes(x = Petal.Length, y = Petal.Width * 1000)) +
geom_point()
plot_grid(p1, p2, ncol = 1, align = "hv", rel_heights = c(2, 1))
```
Best,
Ulrik
On 07/25/2020 03:05 PM, H wrote:
> On 07/25/2020 03:01 PM, Rui Barradas wrote:
>> Hello,
>>
>> OK, now it's reproducible, thanks.
>> align = "hv" works like I had suggested.
>>
>> The full code is now
>>
>> library(ggplot2)
>> library(cowplot)
>>
>> s <- ggplot(data = subset(iris, Species == 'virgi
On 07/25/2020 03:01 PM, Rui Barradas wrote:
> Hello,
>
> OK, now it's reproducible, thanks.
> align = "hv" works like I had suggested.
>
> The full code is now
>
> library(ggplot2)
> library(cowplot)
>
> s <- ggplot(data = subset(iris, Species == 'virginica'), aes(Sepal.Length,
> Sepal.Width)) + g
Hello,
OK, now it's reproducible, thanks.
align = "hv" works like I had suggested.
The full code is now
library(ggplot2)
library(cowplot)
s <- ggplot(data = subset(iris, Species == 'virginica'),
aes(Sepal.Length, Sepal.Width)) + geom_point()
v <- ggplot(data = subset(iris, Species == 'setosa'
On 07/25/2020 12:36 PM, Rui Barradas wrote:
> Hello,
>
> Inline.
>
> Às 16:54 de 25/07/2020, H escreveu:
>> On 07/24/2020 05:56 PM, Rui Barradas wrote:
>>> Hello,
>>>
>>> I've just tried it.
>>>
>>> library(ggplot2)
>>> #library(grid)
>>> library(cowplot)
>>>
>>> s <- ggplot(data = subset(iris, Spe
Hello,
Inline.
Às 16:54 de 25/07/2020, H escreveu:
On 07/24/2020 05:56 PM, Rui Barradas wrote:
Hello,
I've just tried it.
library(ggplot2)
#library(grid)
library(cowplot)
s <- ggplot(data = subset(iris, Species == 'virginica'), aes(Sepal.Length,
Sepal.Width)) + geom_point()
v <- ggplot(dat
On 07/24/2020 05:56 PM, Rui Barradas wrote:
> Hello,
>
> I've just tried it.
>
> library(ggplot2)
> #library(grid)
> library(cowplot)
>
> s <- ggplot(data = subset(iris, Species == 'virginica'), aes(Sepal.Length,
> Sepal.Width)) + geom_point()
> v <- ggplot(data = subset(iris, Species == 'setosa')
Hello,
I've just tried it.
library(ggplot2)
#library(grid)
library(cowplot)
s <- ggplot(data = subset(iris, Species == 'virginica'),
aes(Sepal.Length, Sepal.Width)) + geom_point()
v <- ggplot(data = subset(iris, Species == 'setosa'), aes(Sepal.Length,
Sepal.Width)) + geom_point()
#g2 <- ggp
?grid.frame, etc. should be straightforward for this I would think.
But of course you have to resort to the underlying grid framework rather
than the ggplot2 interface.
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Be
On 07/24/2020 02:50 PM, H wrote:
> On 07/24/2020 02:03 PM, Jeff Newmiller wrote:
>> The set of people interested in helping when you supply a minimal
>> reproducible example is rather larger than the set of people willing to read
>> the documentation for you (hint) and guess what aspect of alignm
What about cowplot?
https://cran.r-project.org/web/packages/cowplot/vignettes/introduction.html
On Friday, July 24, 2020, 11:51:17 AM PDT, H wrote:
On 07/24/2020 02:03 PM, Jeff Newmiller wrote:
> The set of people interested in helping when you supply a minimal
> reproducible example i
On 07/24/2020 02:03 PM, Jeff Newmiller wrote:
> The set of people interested in helping when you supply a minimal
> reproducible example is rather larger than the set of people willing to read
> the documentation for you (hint) and guess what aspect of alignment you are
> having trouble with.
>
The set of people interested in helping when you supply a minimal reproducible
example is rather larger than the set of people willing to read the
documentation for you (hint) and guess what aspect of alignment you are having
trouble with.
On July 24, 2020 10:46:57 AM PDT, H wrote:
>On 07/24/2
On 07/24/2020 01:14 PM, John Kane wrote:
> Well, I am not looking for help debugging my code but for information to
> better understand arranging plots vertically. The code above aligns them
> horizontally as expected.
>
> Sigh, we know the code works but we do not know what the plots are and w
Well, I am not looking for help debugging my code but for information to
better understand arranging plots vertically. The code above aligns them
horizontally as expected.
Sigh, we know the code works but we do not know what the plots are and we
cannot play around with them to see if we can help
On 07/24/2020 05:29 AM, Erich Subscriptions wrote:
> Hav a look at the packages cowplot and patchwork
>
>> On 24.07.2020, at 02:36, H wrote:
>>
>> I am trying to arrange two plots vertically, ie plot 2 below plot 1, where I
>> want the plots to align columnwise but have a height ratio of eg 3:1.
On 07/24/2020 10:16 AM, John Kane wrote:
> We reallly need to see more code (a minimum working example and some data.
>
> For some suggestions on how to do this see
>
> http://adv-r.had.co.nz/Reproducibility.html
>
> http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-exa
We reallly need to see more code (a minimum working example and some data.
For some suggestions on how to do this see
http://adv-r.had.co.nz/Reproducibility.html
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
On Fri, 24 Jul 2020 at 01:16, H wrote:
> I a
I am trying to arrange two plots vertically, ie plot 2 below plot 1, where I
want the plots to align columnwise but have a height ratio of eg 3:1.
My attempts so far after consulting various webpages is that the following code
aligns them columnwise correctly but I have, so far, failed in settin
21 matches
Mail list logo