-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ggside PKG is superb + a quick Q #60
Comments
Hi @sfd99, I'm glad you find library(ggside)
#> Loading required package: ggplot2
#> Registered S3 method overwritten by 'ggside':
#> method from
#> +.gg ggplot2
# the easy case is adding separate geometries to either side.
ggplot(iris, aes(Sepal.Width, Sepal.Length, color = Species)) +
geom_point() +
geom_xsidehistogram(aes(fill = Species)) +
geom_ysideboxplot(orientation = "x")
#> `stat_xsidebin()` using `bins = 30`. Pick better value with `binwidth`. # ggside at this moment does not support adding multiple `geom_xside*` geometries
# to the same side but in separate panels. You can however use a less advertised function
# position_rescale(). This function is rather defunct and was added very early in `ggside`'s
# lifecycle. In-fact, I omitted `position_xrescale()` from the below example because it appears
# to be bugged.
# the intention behind `position_rescale()` is to control where items are rendered in a single
# panel. I haven't yet attempted to make geometries in separate panels because that would
# complicate `ggside`'s compatibility with `facet_grid()`/`facet_wrap()`:
ggplot(iris, aes(Sepal.Width, Sepal.Length, color = Species)) +
geom_point() +
geom_xsidehistogram(aes(fill = Species)) +
geom_xsideboxplot(orientation = "y",
aes(y = as.integer(Species)),
position = position_yrescale(range = 25,
midpoint = 60)) +
geom_ysidehistogram(aes(fill = Species))
#> `stat_xsidebin()` using `bins = 30`. Pick better value with `binwidth`.
#> `stat_ysidebin()` using `bins = 30`. Pick better value with `binwidth`. Created on 2024-09-04 with reprex v2.1.1 |
Hi Justin, thks for the quick reply! Yes, that's what I meant: " ...adding multiple Understood, But... Thanks! |
Hi Justin,
ggside PKG is superb!
Is it possible to add
more than 1 ggside plot
along both the x and y axes?.
ie:
both, a ggside Boxplot
and a ggside Histogram plots
on the x AND also on the Y side of a plot?.
Can you give a concrete, simple R code example?
Thanks!!
sfd99
San Francisco.
The text was updated successfully, but these errors were encountered: