Skip to content

Combine ggupset with geom_raster #40

Description

@Alexandr3K3vin

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 <chr [1]> 0.015 WT
4 <chr [1]> 0.06 WT
5 <chr [2]> 0.125 WT
6 <chr [2]> 0.25 WT
7 <chr [3]> 0.5 WT
8 <chr [2]> 0.06 WT
9 <chr [3]> 0.125 WT
10 <chr [3]> 1 WT

ℹ 71 more rows

ℹ Use print(n = ...) to see more rows

Do someone know to resolve this issue please ?

Many thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions