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
In questa pagina del sito puoi guardare il video online Plot Only Text in R (2 Examples) | Create Graphic in Base & ggplot2 | text() & annotate() Functions della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Statistics Globe 31 gennaio 2022, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 256 volte e gli è piaciuto 7 spettatori. Buona visione!