Creating a jitter plot / stripchart with ggplot2's geom_jitter and stat_summary in R (CC090)

Поделиться
HTML-код
  • Опубликовано: 23 окт 2024

Комментарии • 34

  • @Riffomonas
    @Riffomonas  3 года назад +1

    For a stripchart/jitter plot, is showing the median enough, or do you want to see more summary information about the shape of distribution embedded in the figure?

    • @annazemke493
      @annazemke493 2 года назад +1

      I think it also depends on the sample size, as you started to discuss. If I try to look at data from a giant drug trial, too many points=brain jitters. The current data set is at the upper size limit and I have mild jitters. My mental habit of methodically looking at axes/scale, labels, then distribution also hits bumps without the distribution explicitly plotted. I hit the same bumps on your Z-shape because when I went to find the axis labels I couldn't. Retraining my brain is slow, but worth it. Thank you for putting all these videos together. I am learning a ton and able to do a better job looking at my own data. You've also got some great resources to incorporate into teaching literature evaluation, which I appreciate.

    • @Riffomonas
      @Riffomonas  2 года назад

      @@annazemke493 Thanks Anna - glad you're enjoying the videos!

  • @JJLovesCeramics
    @JJLovesCeramics 2 года назад +1

    Thank you so much! I was lost in the code for a homework assignment. My jitter plot looks leagues better now.

    • @Riffomonas
      @Riffomonas  2 года назад

      Fantastic! Glad to be of help 🤓

  • @KameshwarChoppella
    @KameshwarChoppella Год назад

    'horizontal variation within each category is determined randomly to separate the points'
    -wise man

  • @kathydzr
    @kathydzr Год назад

    Thank you so much for your explanation!!

  • @niceday2015
    @niceday2015 2 года назад

    Thank you my great Master Shifu.

  • @drjzee
    @drjzee 3 года назад +2

    I really like these plots and have seen in publications are fusion of these and bar plots which are quite good for those who really like the bars! Have you tried ggbeeswarm? I like that too as it does something similar but shows the density of points at each level on the y axis in a similar way to a violin plot.

    • @Riffomonas
      @Riffomonas  3 года назад

      Hi drjzee - Thanks for sharing ggbeeswarm, I'll look into it more. Some of the examples in their documentation look a lot like the output from geom_dotplot. I'll talk more about that in Wednesday's video with violin plots

  • @MrJL-xk5jb
    @MrJL-xk5jb 2 месяца назад

    your videos are so useful, lots of thanks.
    How do you comment (#) more thant one line at the same time?

    • @Riffomonas
      @Riffomonas  2 месяца назад +1

      I highlight the lines and then use the shortcut to comment them. On my mac it's shift-command-c

  • @rishikeshdash12
    @rishikeshdash12 2 года назад +1

    Sir, I have Mailed You a Paper In which I am confused that they Have used Slope Plot or Simple line Plot to Show F/B ratio Throughout childhood

    • @Riffomonas
      @Riffomonas  2 года назад +1

      Sorrry but I don’t have the bandwidth to help with individual issues

    • @rishikeshdash12
      @rishikeshdash12 2 года назад

      @@Riffomonas Sir, It's related to your previous video....it also helps others and that paper also have correlation plots and I think you haven't made any video on that correlation plot also. Please Sir check it out once.

  • @adolfogrosso8986
    @adolfogrosso8986 3 года назад +1

    Hello. How do you put N=155 under the labels (axis "X")

    • @Riffomonas
      @Riffomonas  3 года назад +1

      Hey Adolfo - thanks for the question! If you look back two episodes earlier, I went through this. Here is the link to the timestamp where I generate the count and add it to the x-axis label ruclips.net/video/IPey9jk_NOQ/видео.html

  • @cyrillejar1914
    @cyrillejar1914 3 года назад +1

    I confirm I disagree with you I greatly prefer boxplot, but as always is quite interesting to watch your video.

    • @Riffomonas
      @Riffomonas  3 года назад +1

      Thanks Cyrille! Stay tuned for the next episode where I will talks about boxplots. My concerns with boxplots is no one seems to know what the whiskers represent. Also, if you only have a few points, the box seems to be trying to say too much. For this data set, I think the boxes, without whiskers might work well. Keep watching 😊

    • @cyrillejar1914
      @cyrillejar1914 3 года назад

      @@Riffomonas I'm looking forward....
      For me, it seems easier to explain whiskers rather than jitter plot, but I see your point ....

  • @rishikeshdash12
    @rishikeshdash12 2 года назад +1

    not working in my code

    • @Riffomonas
      @Riffomonas  2 года назад +1

      Are you using element_markdown?

    • @rishikeshdash12
      @rishikeshdash12 2 года назад

      @@Riffomonas No I am using only element_text in axis.text.x to make bold the words

    • @Riffomonas
      @Riffomonas  2 года назад +1

      @@rishikeshdash12 element_mardown is what you need instead of element_text

    • @rishikeshdash12
      @rishikeshdash12 2 года назад

      @@Riffomonas thank You so much Sir

    • @rishikeshdash12
      @rishikeshdash12 2 года назад

      @@Riffomonas Thank you sir...I did it.

  • @rishikeshdash12
    @rishikeshdash12 2 года назад +1

    how to add error bars here?

  • @rishikeshdash12
    @rishikeshdash12 2 года назад

    how to increase jitter size?

    • @Riffomonas
      @Riffomonas  2 года назад +1

      jitter.width

    • @rishikeshdash12
      @rishikeshdash12 2 года назад

      @@Riffomonas inside the geom_jitter() function?

    • @rishikeshdash12
      @rishikeshdash12 2 года назад

      @@Riffomonas Sir it's not working inside the geom_jitter function