Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Graph
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
plot(c(-3,3), c(-1,5), type = "n", xlab="x", ylab="y") x <- c(1,2,3) y <- c(1,3,8) plot(x,y) lmout <- lm(y ~ x) abline(lmout) lines(c(1.5,2.5),c(3,3),type="l") x <- c(1.2,3.4,1.3,-2.1,5.6,2.3,3.2,2.4,2.1,1.8,1.7,2.2) y <- c(2.4,5.7,2.0,-3,13,5,6.2,4.8,4.2,3.5,3.7,5.2) plot(x,y,cex=.8,pch=1,xlab="x",ylab="y",col="blue") x<-1:10; y1=x*x; y2=2*y1 plot(x, y1, type="b", pch=19, col="red", xlab="x", ylab ="y") lines(x, y2, pch=18, col="blue", type="b", lty=2) legend(1, 95, legend=c("Line 1", "Line 2"),col=c("red", "blue"), lty=1:2, cex=0.8) legend(1, 95, legend=c("Line 1", "Line 2"),col=c("red", "blue"), lty=1:2, cex=0.8, title="Line types", text.font=4, bg='lightblue') # Remove legend border using box.lty = 0 legend(1, 95, legend=c("Line 1", "Line 2"), col=c("red", "blue"), lty=1:2, cex=0.8, box.lty=0) # Change the border legend("bottomright", legend=c("Line 1", "Line 2"), col=c("red", "blue"), lty=1:2, cex=0.8, box.lty=2, box.lwd=2, box.col="green") x<-1:10; y1=x*x; y2=2*y1 plot(x, y1, type="b", pch=19, col="red", xlab="x", ylab="y") lines(x,y2,pch=18,col="blue",type="b",lty=2) text(c(2,2),c(3,3),labels=c("Non-case","Case")) hist(c(12,5,13,25,16)) x <-c(6,7,3,8,4,9,5) y<-c(1,6,7,3,4,8,2) plot(x,y,main="Effectofcex.main,cex.labandcex.axis", cex.main=1.25,cex.lab=1.5, cex.axis=0.75) plot(0:100,0:100,xlim=c(0,32),ylim=c(0,40),type="l", xlab ="video",ylab="bhp") age<-c(21,30,16,19,40) bone<-c(2,3,2.5,5,4) plot(age,bone) lines(lowess(age,bone),col="red") set.seed(1) x <- rnorm(100) y <- x + rnorm(100) plot(y ~ x) curve((x), add = TRUE)
[
+
]
Show input
edit mode
|
history
|
discussion