<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://jsxgraph.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Scatter_plot_with_slider</id>
	<title>Scatter plot with slider - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://jsxgraph.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Scatter_plot_with_slider"/>
	<link rel="alternate" type="text/html" href="https://jsxgraph.org/wiki/index.php?title=Scatter_plot_with_slider&amp;action=history"/>
	<updated>2026-04-06T16:17:08Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://jsxgraph.org/wiki/index.php?title=Scatter_plot_with_slider&amp;diff=7631&amp;oldid=prev</id>
		<title>A WASSERMANN at 09:03, 23 November 2023</title>
		<link rel="alternate" type="text/html" href="https://jsxgraph.org/wiki/index.php?title=Scatter_plot_with_slider&amp;diff=7631&amp;oldid=prev"/>
		<updated>2023-11-23T09:03:11Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:03, 23 November 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l7&quot;&gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;var slider = board.create(&amp;#039;slider&amp;#039;, [[-3, 4.5], [3, 4.5], [0,3,5]]);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;var slider = board.create(&amp;#039;slider&amp;#039;, [[-3, 4.5], [3, 4.5], [0,3,5]]);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;var scatterplot = board.create(&#039;curve&#039;, [[], []], {strokeWidth: 3});&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;var scatterplot = board.create(&#039;curve&#039;, [[], []], {strokeWidth: 3&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, lineCap: &#039;round&#039;&lt;/ins&gt;});&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;scatterplot.updateDataArray = function() {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;scatterplot.updateDataArray = function() {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l33&quot;&gt;Line 33:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 33:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;var slider = board.create(&amp;#039;slider&amp;#039;, [[-3, 4.5], [3, 4.5], [0,3,5]]);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;var slider = board.create(&amp;#039;slider&amp;#039;, [[-3, 4.5], [3, 4.5], [0,3,5]]);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;var scatterplot = board.create(&#039;curve&#039;, [[], []], {strokeWidth: 3});&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;var scatterplot = board.create(&#039;curve&#039;, [[], []], {strokeWidth: 3&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, lineCap: &#039;round&#039;&lt;/ins&gt;});&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;scatterplot.updateDataArray = function() {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;scatterplot.updateDataArray = function() {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>A WASSERMANN</name></author>
	</entry>
	<entry>
		<id>https://jsxgraph.org/wiki/index.php?title=Scatter_plot_with_slider&amp;diff=6952&amp;oldid=prev</id>
		<title>A WASSERMANN: Created page with &quot;Here is a dynamic scatter plot whose value depend on a slider. See Scatter plot for a static scatter plot.  &lt;jsxgraph width=&quot;500&quot; height=&quot;500&quot;&gt; const board = JXG.JSXGraph....&quot;</title>
		<link rel="alternate" type="text/html" href="https://jsxgraph.org/wiki/index.php?title=Scatter_plot_with_slider&amp;diff=6952&amp;oldid=prev"/>
		<updated>2020-04-20T12:00:27Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Here is a dynamic scatter plot whose value depend on a slider. See &lt;a href=&quot;/wiki/index.php?title=Scatter_plot&quot; title=&quot;Scatter plot&quot;&gt;Scatter plot&lt;/a&gt; for a static scatter plot.  &amp;lt;jsxgraph width=&amp;quot;500&amp;quot; height=&amp;quot;500&amp;quot;&amp;gt; const board = JXG.JSXGraph....&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Here is a dynamic scatter plot whose value depend on a slider. See [[Scatter plot]] for a static scatter plot.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;jsxgraph width=&amp;quot;500&amp;quot; height=&amp;quot;500&amp;quot;&amp;gt;&lt;br /&gt;
const board = JXG.JSXGraph.initBoard(&amp;#039;jxgbox&amp;#039;, { &lt;br /&gt;
    boundingbox: [-5, 5, 5, -5], axis:true&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
var slider = board.create(&amp;#039;slider&amp;#039;, [[-3, 4.5], [3, 4.5], [0,3,5]]);&lt;br /&gt;
var scatterplot = board.create(&amp;#039;curve&amp;#039;, [[], []], {strokeWidth: 3});&lt;br /&gt;
&lt;br /&gt;
scatterplot.updateDataArray = function() {&lt;br /&gt;
	var i, &lt;br /&gt;
      s = slider.Value(); &lt;br /&gt;
  &lt;br /&gt;
  this.dataX = [];&lt;br /&gt;
  this.dataY = [];&lt;br /&gt;
  for (i = 0; i &amp;lt; 1000; i++) {&lt;br /&gt;
    x = Math.random() * 8 - 4;&lt;br /&gt;
    y = Math.random() * s * 2 - s;&lt;br /&gt;
    this.dataX.push(x, x, NaN);&lt;br /&gt;
    this.dataY.push(y, y, NaN);&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
board.update();&lt;br /&gt;
&amp;lt;/jsxgraph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The underlying JavaScript code===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
const board = JXG.JSXGraph.initBoard(&amp;#039;jxgbox&amp;#039;, { &lt;br /&gt;
    boundingbox: [-5, 5, 5, -5], axis:true&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
var slider = board.create(&amp;#039;slider&amp;#039;, [[-3, 4.5], [3, 4.5], [0,3,5]]);&lt;br /&gt;
var scatterplot = board.create(&amp;#039;curve&amp;#039;, [[], []], {strokeWidth: 3});&lt;br /&gt;
&lt;br /&gt;
scatterplot.updateDataArray = function() {&lt;br /&gt;
	var i, &lt;br /&gt;
      s = slider.Value(); &lt;br /&gt;
  &lt;br /&gt;
  this.dataX = [];&lt;br /&gt;
  this.dataY = [];&lt;br /&gt;
  for (i = 0; i &amp;lt; 1000; i++) {&lt;br /&gt;
    x = Math.random() * 8 - 4;&lt;br /&gt;
    y = Math.random() * s * 2 - s;&lt;br /&gt;
    this.dataX.push(x, x, NaN);&lt;br /&gt;
    this.dataY.push(y, y, NaN);&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
board.update();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Examples]]&lt;br /&gt;
[[Category:Curves]]&lt;/div&gt;</summary>
		<author><name>A WASSERMANN</name></author>
	</entry>
</feed>