Search notes:

R function: legend

#
#   See also ../examples/graphs/legend.R
#

x       <- seq(-5, 5, 0.1)

y_norm  <- dnorm (x)
y_t     <- dt    (x,  1)
y_chisq <- dchisq(x,  0.5)

x11()

plot  (x, y_norm   , pch=2, col=2, xlab="x", ylab="distribution", main="Example for legend()")
points(x, y_t      , pch=3, col=3)
points(x, y_chisq  , pch=4, col=4)

legend(-4.8, 0.38, c("norm", "t", "chisq"), col=c(2,3,4), pch=c(2,3,4))

z <- locator(1) # wait for mouse click or enter pressed
Github repository about-r, path: /functions/legend.R

See also

Index to (some) R functions

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1740536314, '3.15.173.49', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/R/functions/legend(56): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78