How to create a graphic that contains only text in the R programming language. More details: https://statisticsglobe.com/plot-only...
R code of this video:
par(mar = c(0, 0, 0, 0)) # Remove white space around plot
plot(x = 0:1, # Create empty plot
y = 0:1,
ann = F,
bty = "n",
type = "n",
xaxt = "n",
yaxt = "n")
text(x = 0.5, # Add text to empty plot
y = 0.5,
"This is my first line of text!\nAnother line of text.\n(Created by Base R)",
cex = 1.8)
install.packages("ggplot2") # Install ggplot2 package
library("ggplot2") # Load ggplot2 package
ggplot() + # Draw ggplot2 plot with text only
annotate("text",
x = 1,
y = 1,
size = 8,
label = "This is my first line of text!\nAnother line of text.\n(Created by ggplot2)") +
theme_void()
Follow me on Social Media:
Facebook – Statistics Globe Page: / statisticsglobecom
Facebook – Group for Discussions & Questions: / statisticsglobe
LinkedIn – Statistics Globe Page: / statisticsglobe
LinkedIn – Group for Discussions & Questions: / 12555223
Twitter: / joachimschork
Music by bensound.com
Auf dieser Seite können Sie das Online-Video Plot Only Text in R (2 Examples) | Create Graphic in Base & ggplot2 | text() & annotate() Functions mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Statistics Globe 31 Januar 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 256 Mal angesehen und es wurde von 7 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!