Home > Net >  bar plot with long list of information
bar plot with long list of information

Time:04-26

Do you have any idea how can deal this kind of graph. I have long list of the information which should be visible and I have to make stacked graph. How can I show the represent color? it could be animation or below the stacked graph, any suggestion?thank you in ana advance ggplot with long list

CodePudding user response:

It would be easier for us to help if you could share a sample of your data and any initial attempt to code a solution. Here's a little illustrative reproducible example of a stacked bar chart.

Please clarify how you would like to deal with the 76 colours. In this example I've suppressed the legend.

library(tidyverse)

data_df <- tibble(group = c(rep("a", 38), rep("b", 38)),
                  value = abs(rnorm(76, 10, 10)),
                  fill = 1:76)

data_df |> 
  mutate(fill = factor(fill)) |> 
  ggplot(aes(group, value, fill = fill))  
  geom_col(show.legend = FALSE)

Created on 2022-04-25 by the reprex package (v2.0.1)

CodePudding user response:

Thanks a lotfor your support Problem is I have 76 color fill information, how can I deai with it you can see it here

enter image description here

  • Related