ex1<-function(x){
1.0*sin(x)
}
ex2<-function(x){
0.5*sin(x-pi/3)
}
ex3<-function(x){
ex1(x)+ex2(x)
}
plot(ex1, xlim=c(-2*pi, 2*pi), ylim=c(-2, 2), ylab="Test Plotting", main="Superposition Principle")
par(new=T)
plot(ex2, xlim=c(-2*pi, 2*pi), ylim=c(-2, 2), ylab="", xaxt="n", yaxt="n")
par(new=T)
plot(ex3, xlim=c(-2*pi, 2*pi), ylim=c(-2, 2), ylab="", xaxt="n", yaxt="n", col="red")