Scatter plot and Line plot in R (using ggplot2)
ฝัง
- เผยแพร่เมื่อ 5 ก.ค. 2024
- In depth video looking at how to draw scatter plots and line plots in R, as well as other graphs such as bubble plots. The R file used in this video can be found here: 1drv.ms/u/s!AjV0z-feoMBLhOMCf.... The geoms used in this video, and in order of use, are:
geom_point(), geom_abline(), geom_smooth(), geom_hline(), geom_vline(), geom_jitter(), geom_violin(), and geom_line(). See the timestamps for each section below!
00:00 - Intro
00:17 - A Scatter Plot with a Trend Line (geom_point(), geom_abline() and geom_smooth())
04:13 - Adding the Trend Line Equation to the Graph
07:04 - Marking Where Trends Happen (geom_hline() and geom_vline())
10:11 - Visualing a Respone for Categorical data (geom_jitter() and geom_violin())
13:05 - Connecting the Dots (geom_point() and geom_line())
17:46 - Bubble Plot (Application of geom_point())
you are such a great lecturer! ive watched 2 of your videos and you are brilliant and is so easy to understand you!!!
Thank you so much! I will try to create more videos soon!
Thank you very much. This is really helpful.
thank you so much, I got a job in data science thanks to this
liked and subscribed
Very helpful tute buddy thank you from Saudi Arabia
Excelente video amigo, felicitaciones y gracias por compartir
Great work
Thank you! I am going to be releasing another video soon so keep an eye out for it.
ty subbed
If I have replicates, how to deal with that?
Hello, thank you for video. But the package ‘ggpmisc’ is not available. How to install it?
Hi, thanks for watching the video! You should be able to install it using the command 'install.packages(ggpmisc)'. In my video "Introduction to ggplot in R" I discuss how to install a package if you want to look at that (about 35 seconds into the video).
@@peelingbackdata3907 thanks a lot!
@@peelingbackdata3907 could you please explain or do a video how to create two curves with correlation coefficient in one graph, in this video only one. If it is possible with p-value would be great! Thank you!
@@shohnazarhazratqulov6731 Hi yeah sure I would be happy to explain that! I will feature that at the end of my next video (which I should have out by the end of tomorrow).
@@peelingbackdata3907 Thank you, I have already created two linear lines in one graph, but after calculating R>2 (correlation coefficient) the legend of ggplot is deleted , please explain how to do legend with (or after) calculating of R>2, and separate R>2 for each linear lines
I am using Rstudio 4.2.1 every time I am searching for the library ("diamonds"); it shows that "Error in the library("diamonds") : there is no package called ‘diamonds’". Please help me to solve this...
Diamonds dataset is a part of the ggplot2 package. I guess, you tried to open the Diamonds dataset before installing/loading the ggplot2 package?
Try this:
1. Type the code and run it:
install.packages(“ggplot2”)
2. Load the ggplot library:
library(ggplot2)
3. Load the dataset:
data(“diamonds”)
hello
.
Hi!