Difference between revisions of "DotPlot Command"
From GeoGebra Manual
Noel Lambert (talk | contribs) |
(command syntax: changed [ ] into ( )) |
||
Line 1: | Line 1: | ||
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|chart}} | <noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|chart}} | ||
− | ;DotPlot | + | ;DotPlot( <List of Raw Data> ) |
:Returns a dot plot for the given list of numbers, as well as the list of the dot plot points. If a number ''n'' appears in the list of raw data ''k'' times, the returned list contains points ''(n, 1), (n, 2), ..., (n, k)''. | :Returns a dot plot for the given list of numbers, as well as the list of the dot plot points. If a number ''n'' appears in the list of raw data ''k'' times, the returned list contains points ''(n, 1), (n, 2), ..., (n, k)''. | ||
− | :{{example|1=<div><code><nowiki>DotPlot | + | :{{example|1=<div><code><nowiki>DotPlot({2, 5, 3, 4, 3, 5, 3})</nowiki></code> yields ''{(2, 1), (3, 1), (3, 2), (3, 3), (4, 1), (5, 1), (5, 2)}''.</div>}} |
− | ;DotPlot | + | ;DotPlot( <List of Raw Data>, <Stack Adjacent Dots (optional)>, <Scale Factor (optional)> ) |
:Returns a dot plot for the given list of data, as well as the list of the dot plot points. If a data ''n'' appears in the list of raw data ''k'' times, the returned list contains points ''(n, 1), (n, 2),..., (n, k)''. <div>If you choose a ''Scale Factor s'', the returned list contains points ''(n, 1s), (n, 2s), ..., (n, ks)''.</div> ''Stack Adjacent Dots'' means a Boolean Value (true or false): If you choose ''true'', points (which are close to each other) are stacked. If you choose ''false'', the result will be the same as without ''<Stack Adjacent Dots (optional)>''. | :Returns a dot plot for the given list of data, as well as the list of the dot plot points. If a data ''n'' appears in the list of raw data ''k'' times, the returned list contains points ''(n, 1), (n, 2),..., (n, k)''. <div>If you choose a ''Scale Factor s'', the returned list contains points ''(n, 1s), (n, 2s), ..., (n, ks)''.</div> ''Stack Adjacent Dots'' means a Boolean Value (true or false): If you choose ''true'', points (which are close to each other) are stacked. If you choose ''false'', the result will be the same as without ''<Stack Adjacent Dots (optional)>''. | ||
:The command DotPlot will also work with a list of text. | :The command DotPlot will also work with a list of text. | ||
− | :{{example|1=<div><code><nowiki>DotPlot | + | :{{example|1=<div><code><nowiki>DotPlot({"Red", "Red", "Red", "Blue", "Blue"})</nowiki></code> yields ''{(1, 1), (1, 2), (2, 1), (2, 2), (2, 3)}''.</div> {{Note|1=<div>If you use a list of text the DotPlot command will put the result in alphabetical order. (e.g. ''Blue'' appears two times, ''Red'' three times and B comes before R in the alphabet, so you get ''(1, 1), (1, 2)'' for ''Blue'' and ''(2, 1), (2, 2), (2, 3)'' for ''Red''.)</div>}}}} |
Latest revision as of 11:11, 3 October 2017
- DotPlot( <List of Raw Data> )
- Returns a dot plot for the given list of numbers, as well as the list of the dot plot points. If a number n appears in the list of raw data k times, the returned list contains points (n, 1), (n, 2), ..., (n, k).
- Example:
DotPlot({2, 5, 3, 4, 3, 5, 3})
yields {(2, 1), (3, 1), (3, 2), (3, 3), (4, 1), (5, 1), (5, 2)}.
- DotPlot( <List of Raw Data>, <Stack Adjacent Dots (optional)>, <Scale Factor (optional)> )
- Returns a dot plot for the given list of data, as well as the list of the dot plot points. If a data n appears in the list of raw data k times, the returned list contains points (n, 1), (n, 2),..., (n, k). If you choose a Scale Factor s, the returned list contains points (n, 1s), (n, 2s), ..., (n, ks).Stack Adjacent Dots means a Boolean Value (true or false): If you choose true, points (which are close to each other) are stacked. If you choose false, the result will be the same as without <Stack Adjacent Dots (optional)>.
- The command DotPlot will also work with a list of text.
- Example:
DotPlot({"Red", "Red", "Red", "Blue", "Blue"})
yields {(1, 1), (1, 2), (2, 1), (2, 2), (2, 3)}.Note:If you use a list of text the DotPlot command will put the result in alphabetical order. (e.g. Blue appears two times, Red three times and B comes before R in the alphabet, so you get (1, 1), (1, 2) for Blue and (2, 1), (2, 2), (2, 3) for Red.)