Marginal plots using ggExtra: Advanced ggplot2 Show raw data with its distribution

Поделиться
HTML-код
  • Опубликовано: 15 июл 2024
  • #rprogramming #ggplot2 #ggextra #marginalplot #datadistribution #scatterplot
    In this video, I have explained plotting marginal plots using ggplot2 and its extension package ggExtra
    Marginal plots ar scatter plots with distribution plots on the margin
    Scatter plots show relationship but assessing and comparing distribution from scatter is not easy on the eyes.
    Marginal plots help the audience to see and compare distributions without any effort.
    The marginal plots can be any of the distribution plot- densityplot, histogram, boxplot, violin plot or densigram. Densigram is a combination of histogram and densityplot.
    code
    install.packages("ggExtra")
    library(ggExtra)
    library(ggplot2)
    str(iris)
    p = ggplot(iris,aes(Sepal.Length,Sepal.Width,color=Species))+
    geom_point()+
    theme_bw()+
    theme(legend.position = "bottom")+
    geom_smooth()
    ggMarginal(p,groupColour = TRUE,groupFill = TRUE,type="density")
    Facebook page:
    / rajendrachoureisc
    Mail Id:
    rajuchoure@gmail.com
    youtube playlist:
    • R programming tutorials

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

  • @m.irfanmalik5649
    @m.irfanmalik5649 Год назад

    Your all videso are very helpful.
    If possible please make a video on forest plot from metafor package by ggplot2

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

      Thanks for good words I will make that video.

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

    well done sir, I have doctorate degree in Agriculture, always follow your videos. But do you have any plan to have some videos on “RNA-seq analysis with R”? it will be very helpful for many people

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

      Trying to do that. I am learning that fir my own work.

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

    Thank you so much. I am trying to learn R plotting. While running the groupColour code I get the error message 'The `groupColour` theme element is not defined in the element
    hierarchy'. Am I missing something?

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

      If possible share your code.

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

      @@DevResearch I overwrote with the code you provided at the comment section.

  • @christianmartin9035
    @christianmartin9035 9 месяцев назад

    Nice job, but how do you calculate the significance and include them into the plot? I mean when generating the boxplot.

    • @DevResearch
      @DevResearch  9 месяцев назад

      You can use stats_compare_means() from ggpubr with the ggplot.

    • @DevResearch
      @DevResearch  9 месяцев назад

      ruclips.net/video/Bx0h4Vm--jM/видео.html