Search notes:

R graphics: adding a title and labels

The function plot understands the arguments main, xlab and ylab to add titles and labels for the axes.
x11()

x <- seq(-6, 10, by=0.25) # c(-6:10)
y <- x*x*x/8 - 9*x -15

x11()

plot(x, y, 
    main="use main for title"      ,
    xlab="use xlab for the x label",
    ylab="use ylab for the x label",
    xlim=c(-8,12)                  ,
    ylim=c(-45,15)                 ,
  )


z <- locator(1) # wait for mouse click or enter pressed
Github repository about-r, path: /graphics/decoration/title-and-labels.R

See also

R graphics

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...', 1758207816, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/R/graphics/decoration/title-and-labels(60): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78