Combine ggupset with geom_raster
- Dominant language
- R
- Stars
- 399
- Forks
- 32
- PR merge metrics
- No merged PRs in 30d
Description
Hy,
I want to combine ggupset x axis with a plot run by geom_raster()
But geom_raster only works with coord_cartesian
here is the error message :
Error in `geom_raster()`:
! Problem while converting geom to grob.
ℹ Error occurred in the 1st layer.
Caused by error in `draw_panel()`:
! `geom_raster()` only works with `coord_cartesian()`
Run `rlang::last_trace()` to see where the error occurred.
my code is :
db_mic.t6%>%
filter(ATB=="CIP")%>%
ggplot(aes(x=KroR_list, y=P_R))+
geom_raster(aes(fill=MIC))+
scale_x_upset()
and my data base description
# A tibble: 81 × 3
KroR_list MIC P_R
1 0.004 WT
2 0.004 WT
3 0.015 WT
4 0.06 WT
5 0.125 WT
6 0.25 WT
7 0.5 WT
8 0.06 WT
9 0.125 WT
10 1 WT
# ℹ 71 more rows
# ℹ Use `print(n = ...)` to see more rows
Do someone know to resolve this issue please ?
Many thanks
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the provided db_mic.t6 pipeline using geom_raster() and scale_x_upset(). Start by checking how the ggupset axis interacts with geom_raster() and its coord_cartesian() requirement. Done means the combination works without the reported error, or the compatibility limitation is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100