ggplot and geom_lines for clustering
2
0
Entering edit mode
R_diot • 0
@50f26885
Last seen 11 months ago
Denmark

enter image description here

In the picture i have up to 50 different clustering visualized using ggplot and geom_line, now there should be 4 different colors, each representing a genotype, but each line over the different time periods are the same different, only really differencing on the timepoint themselves


data_plot$timestamp <- factor(data_plot$timestamp, levels = c("0min", "45min", "24hr", "6d"))
cluster.condition.png<- ggplot(data_plot, aes(timestamp, value, group = ID )) +
  facet_wrap(~class,nrow = 20, ncol = 10, scales = "free_y") +
  geom_line(alpha = 0.85, aes( x =timestamp, y = value,col = genotype ))  +
  geom_line(data = centers, aes(timestamp, value),
            color = "firebrick1", alpha = 0.80, size = 1.2) +
  labs(x = "Time", y = "Load (normalised)") +
  theme_bw()+
  ggtitle(label = "CONDITION")+
  theme(axis.text.x = element_text(vjust=0.6, angle=-45))

sessionInfo( )

how do I get the blush green lines to be colour coded?

ggplot • 617 views
ADD COMMENT
0
Entering edit mode
ATpoint ★ 3.9k
@atpoint-13662
Last seen 16 hours ago
Germany

This is not related to Bioconductor. Please ask at biostars.org or StackExchange.

ADD COMMENT
0
Entering edit mode
@konstantinos-yeles-8961
Last seen 3 months ago
Italy

Hello R_diot, try to use fill instead of col in this line:

geom_line(alpha = 0.85, aes( x =timestamp, y = value,col = genotype ))  +

If this solved your question please vote it

ADD COMMENT

Login before adding your answer.

Traffic: 690 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6