mtext Function in R (Example) | Write & Add Text to Margins of Plot | Change Size, Position & Color
Автор: Statistics Globe
Загружено: 2023-02-04
Просмотров: 436
How to write text to the margins of a graphic using the mtext function in the R programming language. More details: https://statisticsglobe.com/mtext-fun...
R code of this video:
data <- data.frame(x = 1:7, # Create example data frame
y = 7:1)
plot(data) # Draw plot without additional text
plot(data) # Draw plot
mtext("This is my text!", # Add text to margins of plot
side = 3)
plot(data) # Draw plot
mtext("This is my text!", # Add text to margins of plot
side = 4)
plot(data) # Draw plot
mtext("This is my text!", # Add text to margins of plot
side = 3,
line = - 2)
plot(data) # Draw plot
mtext("This is my text!", # Add text to margins of plot
side = 3,
cex = 2)
plot(data) # Draw plot
mtext("This is my text!", # Add text to margins of plot
side = 3,
col = "red")
Follow me on Social Media:
Facebook – Statistics Globe Page: / statisticsglobecom
Facebook – R Programming Group for Discussions & Questions: / statisticsglobe
Facebook – Python Programming Group for Discussions & Questions: / statisticsglobepython
LinkedIn – Statistics Globe Page: / statisticsglobe
LinkedIn – R Programming Group for Discussions & Questions: / 12555223
LinkedIn – Python Programming Group for Discussions & Questions: / 12673534
Twitter: / joachimschork
Music by bensound.com
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: