0

I need to make a plot as shown in figure2, I tried changing multiple "geom_" functions. Can I get help? I'm able to plot something like this

PLOT 1 WITH POINT/DOT

using :

my_data$Genus = factor(as.character(my_data$Genus), levels=names(x))

ggplot(my_data,
       aes(x=Genus, y=log2FoldChange, color=Phylum)) +
  geom_point(size=6) + 
  theme(axis.text.x = element_text(angle = -90,
                                   hjust = 0,
                                   vjust=0.5))

but instead of "dots" I want the horizontal bars as shown in the second figure.

PLOT_2_Horizontal bars

hrbrmstr
  • 77,368
  • 11
  • 139
  • 205
rahul
  • 81
  • 1
  • 1
  • 3
  • 1
    `geom_bar()` + `coord_flip()`, see: https://ggplot2.tidyverse.org/reference/geom_bar.html – 12b345b6b78 Nov 24 '18 at 00:26
  • 1
    Search for `diverging bar plot`, e.g. [here](https://stackoverflow.com/questions/49290010/how-to-part-diverging-bar-plots-in-r). – Roman Nov 24 '18 at 11:26
  • Possible duplicate of [How to part diverging bar plots in R](https://stackoverflow.com/questions/49290010/how-to-part-diverging-bar-plots-in-r) – Roman Nov 24 '18 at 11:26

0 Answers0