title: Changing axis min/max on an existing plot using Flot JQuery Library
body: <p>I've created a series of plots using the flot library, which are all displayed on a single page. Is there a way to update the X axis min and max options (options.xaxis.min, options.axis.max) values WITHOUT re-plotting the plots ($.plot('placeholder',data,options))? </p>
  
  <p>I found this solution: <a href="http://osdir.com/ml/flot-graphs/2012-02/msg00064.html" rel="nofollow noreferrer">http://osdir.com/ml/flot-graphs/2012-02/msg00064.html</a>
  Which suggests that the following line would do it, but it does not work for me - the plots visible min and max are not modified based on this call.</p>
  
  <pre><code>monitorGraph.getOptions().xaxis[0].max = xaxis.max;
  </code></pre>
  
  <p>Any tips on updating the graphs xaxis max and min values would be greatly appreciated!</p>
  
  <p><strong>EDIT: Solution Below</strong></p>
  
  <p>The following code will take an existing plot, update the range that is visible, and redraw it in a very light and efficient way.</p>
  
  <pre><code>            plot.getOptions().xaxis[0].min = time.start;
              plot.getOptions().xaxis[0].max = time.end;
              plot.setupGrid();
              plot.draw();
  </code></pre>