Advertisement
cherurg

Untitled

Feb 11th, 2015
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var container = new PlotContainer("plot");
  2.  
  3. var controls = new app.Controls(container.addEmptyDiv());
  4.  
  5. var plot = container.addPlot();
  6.  
  7. var func = plot.addFunc(function (x) {
  8.     return x;
  9. });
  10.  
  11.  
  12. var text = "Коэффициент a: ";
  13. var range = controls.addRange(function (value) {
  14.     range.setText(text + value);
  15.     plot.remove(func);
  16.     func = plot.addFunc(function (x) {
  17.         return value*x;
  18.     });
  19.  
  20. }, text + "1", -1, 1, 0.01, 1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement