title: Plotting Log scale in R
body: <p>I'm trying to plot a logarithmic scale, but I keep on getting this error:</p>
  
  <pre><code>Error in plot.window(...) : invalid "log=1/h" specification. 
  </code></pre>
  
  <p>I'm not sure what I am doing wrong. Below is my code:</p>
  
  <pre><code>   #function
  function(stepsize, temp_val, counter) {
    while(counter &lt; 0) {
      counter &lt;- counter + stepsize
      px_norm &lt;- dnorm(counter, mean = 0, sd = .04)
      temp_val &lt;- temp_val + px_norm }
    temp_val &lt;- 2*temp_val
    temp_val &lt;- temp_val *(stepsize/2)
    print(temp_val, digits = 12)
  }
  
  #Initial step size
  h &lt;- .01 
  while (h &gt; .00001) {
    x &lt;- calc_error(h, 0, -5) #Gives me a result around .5
    err &lt;- x - (exp(-.02)*0.5)
    plot(1/h, err, log = "1/h")
    h &lt;- h/10 }
  </code></pre>
  
  <p>Basically, in this short function I'm trying to show as the step size increases, the error from the real answer will decrease. However, I'm having trouble plotting this. Any help will be appreciated. Thanks</p>