<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://70.231.62.181/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FWnt%2FPlotter%2Fdoc</id>
	<title>Module:Sandbox/Wnt/Plotter/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://70.231.62.181/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FWnt%2FPlotter%2Fdoc"/>
	<link rel="alternate" type="text/html" href="http://70.231.62.181/index.php?title=Module:Sandbox/Wnt/Plotter/doc&amp;action=history"/>
	<updated>2026-04-22T08:17:52Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>http://70.231.62.181/index.php?title=Module:Sandbox/Wnt/Plotter/doc&amp;diff=13619415&amp;oldid=prev</id>
		<title>imported&gt;Pppery at 14:41, 5 October 2020</title>
		<link rel="alternate" type="text/html" href="http://70.231.62.181/index.php?title=Module:Sandbox/Wnt/Plotter/doc&amp;diff=13619415&amp;oldid=prev"/>
		<updated>2020-10-05T14:41:25Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Module rating|pre-alpha}}&lt;br /&gt;
Note: now that this module&amp;#039;s pie chart capability has been added to [[Module:Chart]], this module is starting to look obsolete by comparison.  It is therefore rated pre-alpha and not for general use, probably pending a total takeover by Module:Chart.  It&amp;#039;s being kept around only in case there are some functions left the latter hasn&amp;#039;t matched yet, which I haven&amp;#039;t checked.&lt;br /&gt;
&lt;br /&gt;
This module has three plotting capabilities so far.  Some of the code is crude as I began back when I&amp;#039;d first heard of Lua.  They are all written independently and not even the parameters are standardized between them, nor do they share any subroutines.  &amp;quot;Main&amp;quot; needs major work, &amp;quot;bar&amp;quot; is a bit better but not as good as [[Module:Chart]] at present, and &amp;quot;piechart&amp;quot; is closely based on [[Template:Pie chart]].&lt;br /&gt;
&lt;br /&gt;
===function &amp;quot;piechart&amp;quot;===&lt;br /&gt;
This uses the miter joining of border elements in HTML/CSS to draw pie-shaped slices.  I still don&amp;#039;t fully understand the code taken from [[Template:Pie chart]] but have made it a bit more comprehensible.  The main improvement so far is that it is resizable and not limited to 10 slices. &lt;br /&gt;
&lt;br /&gt;
New parameters are&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;Radius&amp;#039;&amp;#039; (default 100) - radius of the pie chart&lt;br /&gt;
* &amp;#039;&amp;#039;nowiki&amp;#039;&amp;#039; - include a nonblank value to read rather than graph the output&lt;br /&gt;
&lt;br /&gt;
To quote the piechart template&lt;br /&gt;
&lt;br /&gt;
* option &amp;quot;thumb&amp;quot; specifies which side of the page the chart is floated to and defaults to &amp;lt;code&amp;gt;right&amp;lt;/code&amp;gt;, as with image files. To make the chart appear on the &amp;#039;&amp;#039;left&amp;#039;&amp;#039; side of the page, specify &amp;lt;code&amp;gt;thumb=left&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;quot;caption&amp;quot; is a string of text that appears on a line just before the legend.&lt;br /&gt;
* option &amp;quot;&amp;lt;code&amp;gt;other&amp;lt;/code&amp;gt;&amp;quot;, if specified, will cause an &amp;quot;Other&amp;quot; item to appear in the legend. &amp;#039;&amp;#039;(don&amp;#039;t know if I implemented that)&amp;#039;&amp;#039;&lt;br /&gt;
* each &amp;quot;label&amp;#039;&amp;#039;N&amp;quot;&amp;#039;&amp;#039; is a string of text that appears in the legend entry for a slice. Omitting it will cause a legend entry to not be shown for that slice.&lt;br /&gt;
* each &amp;quot;value&amp;#039;&amp;#039;N&amp;quot;&amp;#039;&amp;#039; is the percentage that the slice represents. Do &amp;#039;&amp;#039;not&amp;#039;&amp;#039; include the percent sign.  &amp;#039;&amp;#039;(Need to fix that)&amp;#039;&amp;#039;  Also note that it is shown in the legend as written (just after the label), without any rounding or other reformatting.&lt;br /&gt;
* each &amp;quot;color&amp;#039;&amp;#039;N&amp;quot;&amp;#039;&amp;#039; is a [[Web colors|CSS color code or name]].  See [[Module:Plotter/DefaultColors]] for the default values.  This can be overridden with:&lt;br /&gt;
* &amp;quot;colorset&amp;quot; - specifies a Module: space file to get a list of color names and values&lt;br /&gt;
&lt;br /&gt;
Note that the nowiki example given at the beginning of Template:Pie chart&amp;#039;s documentation doesn&amp;#039;t work, but it doesn&amp;#039;t work for that template either.   If there was ever some way to specify colors with numbers like 2 or 8, I think it&amp;#039;s been forgotten.&lt;br /&gt;
&lt;br /&gt;
{{#invoke:Sandbox/Wnt/Plotter|piechart&lt;br /&gt;
|radius=150&lt;br /&gt;
|other = yes&lt;br /&gt;
|value1 = 1&lt;br /&gt;
|label1 = One&lt;br /&gt;
|value2 = 32&lt;br /&gt;
|label2 = Two&lt;br /&gt;
|value3 = 12&lt;br /&gt;
|label3 = Three&lt;br /&gt;
|value4 = 3&lt;br /&gt;
|label4 = Four&lt;br /&gt;
|value5 = 2&lt;br /&gt;
|label5 = Five&lt;br /&gt;
|value6 = 1&lt;br /&gt;
|label6 = Six&lt;br /&gt;
|value7 = 3&lt;br /&gt;
|value8 = 7&lt;br /&gt;
|value9 = 2&lt;br /&gt;
|value10 = 3&lt;br /&gt;
|value11 = 1&lt;br /&gt;
|value12 = 4&lt;br /&gt;
|value13 = 7&lt;br /&gt;
|value14 = 1&lt;br /&gt;
|value15 = 1&lt;br /&gt;
|value16 = 3&lt;br /&gt;
|value17 = 3&lt;br /&gt;
|value18 = 3&lt;br /&gt;
|value19 = 2&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{#invoke:Sandbox/Wnt/Plotter|piechart&lt;br /&gt;
| caption=[[Religion in the Czech Republic]] as of 2001.&lt;br /&gt;
| other = yes&lt;br /&gt;
| label1 = [[Atheist]]s and [[Agnosticism|agnostics]]&lt;br /&gt;
| value1 = 59&lt;br /&gt;
| color1 = silver&lt;br /&gt;
| label2 = [[Catholic Church|Catholics]]&lt;br /&gt;
| value2 = 26.8&lt;br /&gt;
| color2 = #008&lt;br /&gt;
| label3 = [[Protestantism|Protestants]]&lt;br /&gt;
| value3 = 2.5&lt;br /&gt;
| color3 = #08f&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===function &amp;quot;main&amp;quot;===&lt;br /&gt;
This is a demonstrative scatter plot function that doesn&amp;#039;t even have labels added yet.&lt;br /&gt;
* icon (an image to display at each point)&lt;br /&gt;
* iconradius (default 10 - a rough measurement of the icon&amp;#039;s size to help position dashed lines)&lt;br /&gt;
* lineicon (cruddy text icon &amp;quot;•&amp;quot; - should be replaced by divs)&lt;br /&gt;
* lineiconradius (default 5)&lt;br /&gt;
* plotsizex (default 100)&lt;br /&gt;
* plotsizey (default 100)&lt;br /&gt;
* plotstep (default 10) distance between dashes&lt;br /&gt;
* unnamed arguments are x and y coordinates of multiple points&lt;br /&gt;
&lt;br /&gt;
===function &amp;quot;bar&amp;quot;===&lt;br /&gt;
This produces a bar chart.  It has labels but I&amp;#039;m still working on the axis...&lt;br /&gt;
&lt;br /&gt;
local delimiter = args.delimiter or pargs.delimiter or &amp;quot;,&amp;quot;&lt;br /&gt;
* width (default 200) &lt;br /&gt;
* height (default 200)&lt;br /&gt;
* normalize - a list of N numbers corresponding to data series 1 to N.  Each number identifies which series a series should be normalized to.  So &amp;quot;1 2 1 1 3&amp;quot; will plot series 1,4,5 relative to one another, but 2 and 5 will be on their own scale (with their own axis labels, eventually)&lt;br /&gt;
* delimiter (default comma) separates values in group1, group2, etc.&lt;br /&gt;
* group1, group2, group3 etc.  Each is a list of numeric values separated by &amp;#039;&amp;#039;delimiter&amp;#039;&amp;#039;&lt;br /&gt;
* xlegend - labels for each position on the x axis separated by delimiter.  It is assumed all series use the same x values.&lt;br /&gt;
* ylegend - labels for each series of data (group1, group2, etc.)&lt;/div&gt;</summary>
		<author><name>imported&gt;Pppery</name></author>
	</entry>
</feed>