I have the next function that I want to plot:
eq = function(x)
{ a=(sin(5*x)+cos(7*x))^2
b= 5 * (1/sqrt(2*pi*0.05)) * exp(-x^2/(2*0.05))
1-a-b
}
At first I used:
plot(eq(-10:10), type='l')
but then I changed it to:
plot(eq(-10:10), type='l')
axis (1,at=1:21,labels=(-10:10))
Because the x axis wasn't really showing what I needed.
Problem now is that I see some overlaping numbers (a '10' on top of the '-1', etc) not sure why.
My ultimate goal would be to display it like this (with a thick line for both x and y axis):