0

I am currently working on this tile plot (not very experienced):

ggplot(df_A, aes(x = Sample.ID, y = Species, fill = Score)) +
  geom_tile() +
  scale_fill_gradient(low = "#FFC0CB", high = "#800080") +
  theme(axis.text.x = element_text(angle = 100, vjust = 0.5, hjust = 1),
        plot.background = element_rect(fill = "#F8F8F8"))

I would like to show all possible Sample.ID's, not only the ones with at least a low Score. How can I do that?

Thank you in advance

I tried to make a pheatmap in stead and it works (with lots of changes to the data structure, setting NA to all possible Species). But I really would like to have a geom_tile Plot

stefan
  • 90,330
  • 6
  • 25
  • 51
  • 1
    Please post some data to show what the problem is. – procerus Mar 15 '23 at 12:09
  • 1
    I tried to make up some data but it could go a few ways, can you type `dput(df_A)` into the console and copy and paste that as an object so we can work with your data? If it's super long you should subset a number of rows from it (`dput(df_A[1:10,])` – dandrews Mar 15 '23 at 12:17

0 Answers0