Plotting in R using ggplot2: Ribbon plots (Data Visualization Basics in R #15)

preview_player
Показать описание
Today we will be looking at how to create ribbon plots using geom_ribbon() function (within ggplot2 package) in R. For similar videos on data visualization, check out my “Data Visualization in R Tutorial Video Series”; you can find the link to the playlist below:

If you are a beginner interested in learning data analysis in R, check our my “Data Analysis Basics in R Tutorial Video Series” as well. The link is attached below. Enjoy!!!

----------------------------------------

Other related videos/links:

# Data Visualization Basics in R

----------------------------------------

# Data Analysis Basics in R

----------------------------------------

# More about R

----------------------------------------

# GIS/Remote Sensing

----------------------------------------
Рекомендации по теме
Комментарии
Автор

Years=1981:2020
Low=runif(40, min=50, max=100)
High=runif(40, 100, 200)
ETFValue=(Low+High)/2
ETFValue
dfyear=data.frame(Years, Low, High, ETFValue)

ggplot(dfyear, aes(Years))+
geom_ribbon(aes(ymin=Low, ymax=High), fill="yellow")+
ylab=("ETF value")+
geom_line(aes(y=ETFValue), size=2, col="darkblue")
I get Error in ggplot(dfyear, aes(Years)) + geom_ribbon(aes(ymin = Low, ymax = High), :
could not find function "+<-"

melissaharris
visit shbcf.ru