RUVIDEO
Поделитесь видео 🙏

polygon() Function in R (6 Examples) | Frequency & Density Plot | Color Range & Between Densities

How to apply the polygon function in the R programming language. More details: https://statisticsglobe.com/r-polygon-function-plot/
R code of this video:

plot(1, 1, col = "white", xlab = "X", ylab = "Y") # Draw empty plot
polygon(x = c(0.7, 1.3, 1.2, 0.8), # X-Coordinates of polygon
y = c(0.6, 0.8, 1.4, 1), # Y-Coordinates of polygon
col = "#1b98e0") # Color of polygon

plot(1, 1, col = "white", xlab = "X", ylab = "Y") # Draw empty plot
polygon(x = c(0.7, 1.3, 1.2, 0.8), # X-Coordinates of polygon
y = c(0.6, 0.8, 1.4, 1), # Y-Coordinates of polygon
col = "#1b98e0", # Color of polygon
border = "red", # Color of polygon border
lwd = 5) # Thickness of border

x1 <- 1:10 # X values for frequency polygon
y1 <- c(2, 4, 7, 4, 5, 8, 6, 6, 1, 2) # Y values for frequency polygon

plot(x1, y1, # Plot frequency polygon
type = "l", # Set line type to line
lwd = 3) # Thickness of line
polygon(c(1, x1, 10), c(0, y1, 0), # X-Y-Coordinates of polygon
col = "#1b98e0") # Color of polygon
points(x1, y1, # Add squares to frequency polygon
cex = 2, # Size of squares
pch = 15) # Set point type to squares
segments(x1, 0, x1, y1) # Add line segments to plot

set.seed(15051) # Set seed for reproducibility
N <- 1000 # Sample size
x2 <- rpois(N, 2) # Draw random poisson distribution

plot(density(x2), # Draw density plot
main = "", # No main title
xlab = "x2") # Set name of x-axis to x2
polygon(c(min(density(x2)$x), density(x2)$x), # X-Coordinates of polygon
c(0, density(x2)$y), # Y-Coordinates of polygon
col = "#1b98e0") # Color of polygon

poly_range <- density(x2)$x > 1 & density(x2)$x < 2.5 # Set polygon x-range

polygon(c(1, density(x2)$x[poly_range], 2.5), # X-Coordinates of polygon range
c(0, density(x2)$y[poly_range], 0), # Y-Coordinates of polygon range
col = "#353436") # Color of polygon range

plot(density(x2), # Draw density plot again
main = "", # No main title
xlab = "x2 & x3", # Set name of x-axis to x2 & x3
xlim = c(- 6, 10)) # Wider xlim

x3 <- rnorm(N, 2, 2.5) # Draw random normal distribution

polygon(c(density(x3)$x, rev(density(x2)$x)), # X-Coordinates of polygon
c(density(x3)$y, rev(density(x2)$y)), # Y-Coordinates of polygon
col = "#1b98e0") # Color of polygon

Follow me on Social Media:
Facebook – Statistics Globe Page: https://www.facebook.com/statisticsglobecom/
Facebook – R Programming Group for Discussions & Questions: https://www.facebook.com/groups/statisticsglobe
Facebook – Python Programming Group for Discussions & Questions: https://www.facebook.com/groups/statisticsglobepython
LinkedIn – Statistics Globe Page: https://www.linkedin.com/company/statisticsglobe/
LinkedIn – R Programming Group for Discussions & Questions: https://www.linkedin.com/groups/12555223/
LinkedIn – Python Programming Group for Discussions & Questions: https://www.linkedin.com/groups/12673534/
Twitter: https://twitter.com/JoachimSchork

Music by bensound.com

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «polygon() Function in R (6 Examples) | Frequency & Density Plot | Color Range & Between Densities», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.