title: plotting a time series in R, cannot change the y axis
body: <p>I am plotting a time series with R, but I could not specify the range of my y-axis. My time series is mat.mean and mat.mean.gro. My plotting code is here:</p>
  
  <pre><code>plot(ts(mat.mean, frequency = 12, start = c(1976, 12)), col = "green")
  lines(ts(mat.mean.gro, frequency = 12, start = c(1976, 12)), col = "red")
  </code></pre>
  
  <p>I searched around and tried the most popular solutions, like call</p>
  
  <pre><code>axis(2, at=seq(0.4, 2, by=0.4) or modify the code to 
  plot(ts(mat.mean, frequency = 12, start = c(1976, 12)), ylim = c(0.4, 2.0), col = "green"). 
  </code></pre>
  
  <p>The problem is :
  Without adding ylim = c(0.4, 2.0), y axis has a range for my example, say 0.5 to 2.0. After I adding ylim = c(0.4, 2.0), the range is still 0.5 to 2.0 for y axis. This range will make part of my second line hidden in the graph because the range is not big enough.</p>
  
  <p>My data is here:</p>
  
  <pre><code>&gt; mat.mean[1:40]
  [1] 1.297994 1.286905 1.289706 1.269770 1.210151 1.215818 1.234242 1.256248
  [9] 1.288646 1.290055 1.307555 1.283057 1.263023 1.241875 1.349666 1.264034
  [17] 1.245436 1.195517 1.209489 1.162674 1.140096 1.098699 1.180981 1.169342
  [25] 1.164076 1.090923 1.097041 1.058406 1.082420 1.123527 1.133088 1.140946
  [33] 1.125114 1.124824 1.216989 1.235034 1.183935 1.138729 1.162152 1.259850
  
  &gt; mat.mean.gro[1:40]
  [1] 0.9098570 0.8885065 0.8929195 0.8700836 0.8681064 0.8684159 0.8941261
  [8] 0.8452582 0.8595206 0.8562907 0.8555994 0.8806937 0.8646242 0.8206538
  [15] 0.7967376 0.7490888 0.7478145 0.7160734 0.7147583 0.6936500 0.6844725
  [22] 0.6536702 0.6818063 0.6691483 0.6558918 0.6224261 0.6196077 0.6051392
  [29] 0.6181448 0.6427169 0.6556036 0.6653853 0.6698488 0.6684122 0.7074804
  [36] 0.7204438 0.6926981 0.6774449 0.6843505 0.7112838
  </code></pre>
  
  <p>Free feel to tell if you have any comments on this issue.</p>