Skip to main content
deleted 4 characters in body; edited tags
Source Link
Ram RS
  • 2.5k
  • 11
  • 29

I want to have a jitter violin coloured by sample ids but I get this weird plot

    > str(long)
Classes ‘data.table’ and 'data.frame':  156 obs. of  3 variables:
 $ gene    : chr  "gene2" "gene3" "gene4" "gene1" ...
 $ variable: chr  "1016" "1016" "1016" "1016" ...
 $ value   : num  5.82 8.41 11.22 7.21 5.61 ...
 - attr(*, ".internal.selfref")=<externalptr> 
>

> p <- ggplot(long, aes(x=gene, y=value,colour=variable))
> p + geom_violin(width = 1.3) + geom_quasirandom(alpha = 0.2, width = 0.2)+ theme_classic()
There were 21 warnings (use warnings() to see them)

enter image description here

I can not figure out where I am doing something wrong that I get this instead of getting a proper violin plot by dots coloured with sample IDs

I want to have a jitter violin coloured by sample ids but I get this weird plot

    > str(long)
Classes ‘data.table’ and 'data.frame':  156 obs. of  3 variables:
 $ gene    : chr  "gene2" "gene3" "gene4" "gene1" ...
 $ variable: chr  "1016" "1016" "1016" "1016" ...
 $ value   : num  5.82 8.41 11.22 7.21 5.61 ...
 - attr(*, ".internal.selfref")=<externalptr> 
>

> p <- ggplot(long, aes(x=gene, y=value,colour=variable))
> p + geom_violin(width = 1.3) + geom_quasirandom(alpha = 0.2, width = 0.2)+ theme_classic()
There were 21 warnings (use warnings() to see them)

enter image description here

I can not figure out where I am doing something wrong that I get this instead of getting a proper violin plot by dots coloured with sample IDs

I want to have a jitter violin coloured by sample ids but I get this weird plot

> str(long)
Classes ‘data.table’ and 'data.frame':  156 obs. of  3 variables:
 $ gene    : chr  "gene2" "gene3" "gene4" "gene1" ...
 $ variable: chr  "1016" "1016" "1016" "1016" ...
 $ value   : num  5.82 8.41 11.22 7.21 5.61 ...
 - attr(*, ".internal.selfref")=<externalptr> 
>

> p <- ggplot(long, aes(x=gene, y=value,colour=variable))
> p + geom_violin(width = 1.3) + geom_quasirandom(alpha = 0.2, width = 0.2)+ theme_classic()
There were 21 warnings (use warnings() to see them)

enter image description here

I can not figure out where I am doing something wrong that I get this instead of getting a proper violin plot by dots coloured with sample IDs

Source Link
Zizogolu
  • 2.2k
  • 1
  • 14
  • 46

Jitter violin coloured by sample id

I want to have a jitter violin coloured by sample ids but I get this weird plot

    > str(long)
Classes ‘data.table’ and 'data.frame':  156 obs. of  3 variables:
 $ gene    : chr  "gene2" "gene3" "gene4" "gene1" ...
 $ variable: chr  "1016" "1016" "1016" "1016" ...
 $ value   : num  5.82 8.41 11.22 7.21 5.61 ...
 - attr(*, ".internal.selfref")=<externalptr> 
>

> p <- ggplot(long, aes(x=gene, y=value,colour=variable))
> p + geom_violin(width = 1.3) + geom_quasirandom(alpha = 0.2, width = 0.2)+ theme_classic()
There were 21 warnings (use warnings() to see them)

enter image description here

I can not figure out where I am doing something wrong that I get this instead of getting a proper violin plot by dots coloured with sample IDs