I am working with a relatively large dataset (n>1000). I have come across a problem when applying "ifelse" in order to specify different colors in a plot.
With a small selection of data, the specified colors are displayed. When using the large dataset, the colors appear as red and green, no matter which colors I specified. So far I have encountered this problem with ggplot2, plotly and condformat (with different data).
E.g.
condformat(fullData[1:500,]) %>%
rule_fill_discrete(title, expression = ifelse(start_var == end_var, "purple", "orange"))
works, but
condformat(fullData[1:1000,]) %>%
rule_fill_discrete(title, expression = ifelse(start_var == end_var, "purple", "orange"))
will display the colors not in orange and purple, but red and green.
I apologize in advance if this is a trivial question, but my google search remained unsuccesful. Thank you in advance!
Aucun commentaire:
Enregistrer un commentaire