drosofff
12/24/2016 - 6:40 PM

## Wahrol way for plotting curves (ché background)

Wahrol way for plotting curves (ché background)

``````par(mar=c(0,0,0,0), mfrow=c(3,3), oma = c(0,0,0,0))
fonctions <- list (fonc1 = function(x) sin(cos(x)*exp(-x/2)),
fonc2 = function(x) sin(cos(x)*exp(-x/2))/tan(x),
fonc3 = function(x) sin(cos(x)*exp(-x^2))/tan(x),
fonc4 = function(x) sin(cos(x)*exp(-x/20))/tan(x),
fonc5 = function(x) sin(cos(x)*exp(x/2)),
fonc6 = function(x) sin(cos(x)*exp(-x/2)),
fonc7 = function(x) sin(cos(x)*exp(-x/2))/tan(x),
fonc8 = function(x) sin(cos(x)*exp(-x^2))/tan(x),
fonc4 = function(x) sin(cos(x)*exp(-x/20))/tan(x) )
couleurs = c("deeppink3","yellow2","darkslategray", "red3","darkorange","royalblue4","yellowgreen","steelblue","yellow2")
backgrounds = c("yellow2","steelblue","royalblue4", "darkorange","red3","yellowgreen","darkslategray","yellow2","deeppink3")
for (i in 1:9) {
plot(1, type="n", axes=F, xlab="", ylab="", xlim=c(-8,7), ylim=c(-5,5))
myfunc = fonctions[[i]]
curve(myfunc, -8, 7, n = 2001, col=couleurs[i], lwd=7, add=T)
}

## with function diversification and work on dispositon and colors
par(mar=c(0,0,0,0), mfrow=c(3,3), oma = c(0,0,0,0))
fonctions <- list (fonc1 = function(x) sin(cos(x)*exp(-x/2)),
fonc2 = function(x) sin(cos(x)*exp(-x/2))/tan(x),
fonc3 = function(x) sin(cos(x)*exp(-x^2))/tan(x),
fonc4 = function(x) sin(cos(x)*exp(-x/20))/tan(x),
fonc5 = function(x) sin(cos(x)*exp(x/2)),
fonc6 = function(x) sin(x)*log(x^2,2),
fonc7 = function(x) sin(cos(x)*exp(-x/2))/tan(x),
fonc8 = function(x) sin(cos(x)*exp(-x^2))/tan(x),
fonc9 = function(x) -(x^2/3)+4 )
couleurs = c("deeppink3","yellow2","darkorange", "red3","steelblue","royalblue4","yellowgreen","darkslategray","yellow2")
backgrounds = c("yellow2","steelblue","royalblue4", "darkorange","red3","yellowgreen","darkslategray","yellow2","deeppink3")
for (i in 1:9) {
plot(1, type="n", axes=F, xlab="", ylab="", xlim=c(-8,7), ylim=c(-5,5))