Template:Dot graph/doc
| This template uses Lua: |
Explanation
This template is used to produce a Dot graph/Dot plot/Scatter plot.
There are two ways of using this template (Usage A is more for scatter plots whereas Usage B is for Dot graph/Dot plots):
- Usage A (|x|y...): It takes a x input (0-100) then a y input (0-100) and so on {{Graph:Dot|x|y|x|y|x|y|x|y|...}}
- Usage B (|cols=|dots=|y...): It takes cols = number of columns (x) and dots = number of dots per columns {{Graph:Dot|cols=#|dots=#|y|y|y|y|y|...}}
- Example: {{Graph:Dot|0|10|0|90|33|20|33|80|66|40|66|60}} ≈ {{Graph:Dot|cols=3|rows=2|10|90|20|80|40|60}}
- Note: cols + rows should equal the number of values that follow
- Note: Usage B almost always has more precision then Usage B
- Note: x inputs are from 0-100 and y inputs are from 0-100
This template also takes a variety of other parameters:
- |color-#= The template can take a color input for each do that is color-dot number (The default color is red) (overrides color-even and color-odd)
- |align= The alignment of the chart (default right)
- |color= The background color (default none/transparent)
- |border= Whether of not to show the border (default yes)
- |yx= Take y then x instead of x then y (default no)
- |color-even= Sets every other dot to a specific color (default red)
- |color-odd= Sets every odd dot to a specific color (default blue)
- |square= Makes the chart/plot a square (default no)
Examples
{{Graph:Dot|align=left|10|20|10|60|50|40|50|60|90|10|90|20}}
Script error: No such module "Dot chart".
{{Graph:Dot|align=left|0|100|100|0|0|0|100|100}}
Script error: No such module "Dot chart".
{{Graph:Dot|yx=yes|align=left|10|20|10|60|50|40|50|60|90|10|90|20}}
Script error: No such module "Dot chart".
{{Graph:Dot|align=left|cols=3|dots=2|90|10|80|20|70|30}}
Script error: No such module "Dot chart".
{{Graph:Dot|square=yes|align=left|cols=3|dots=2|90|10|80|20|70|30}}
Script error: No such module "Dot chart".
{{Graph:Dot|align=right|40|10|60|10|40|20|60|20|40|30|60|30|color-1=blue|color-3=blue|color-5=blue}}
Script error: No such module "Dot chart".
{{Graph:Dot|align=left|40|10|60|10|40|20|60|20|40|30|60|30|color-even=blue}}
Script error: No such module "Dot chart".
{{Graph:Dot|align=center|40|10|60|10|40|20|60|20|40|30|60|30|color-odd=blue}}
Script error: No such module "Dot chart".
{{Graph:Dot|border=no|align=left|10|20|10|60|50|40|50|60|90|10|90|20|color-1=blue|color-3=blue|color-5=blue}}
Script error: No such module "Dot chart".
{{Graph:Dot|color=green|align=left|10|20|10|60|50|40|50|60|90|10|90|20|color-1=blue|color-3=blue|color-5=blue}}
Script error: No such module "Dot chart".
Error messages
{{Graph:Dot|color=green|align=left|10|20|10|60|50|40|50|60|90|10|90}}
Script error: No such module "Dot chart".
{{Graph:Dot|yx=yes|color=green|align=left|10|20|10|60|50|40|50|60|90|10|90}}
Script error: No such module "Dot chart".
{{Graph:Dot|align=left|cols=3|90|10|80|20|70|30}}
Script error: No such module "Dot chart".
{{Graph:Dot|align=left|dots=2|90|10|80|20|70|30}}
Script error: No such module "Dot chart".