title: Set custom grid lines
body: <p>I am creating a plot in Matlab with a logarithmic x-scale. When I turn the grid lines on, it creates verticle lines with steps of 10^0.1 (figure 1). I only want ticks every 10^1.</p>
  
  <p>I've tried using <code>set(gca,'xtick',10.^[-3:2])</code>, which does not change anything. I can set most of the ticks I want (Figure 2), but as soon as I add a tick at 10^-2, all of the smaller grid lines appear as well.</p>
  
  <p><strong>Is there a way to get the gridlines I want without plotting them manually?</strong></p>
  
  <p>Figure 1</p>
  
  <p><img src="https://i.stack.imgur.com/UsUFh.png" alt="Figure 1"></p>
  
  <p>Figure 2</p>
  
  <p><img src="https://i.stack.imgur.com/4KzC6.png" alt="Figure 2"></p>