Stem-and-leaf plot

From Rosetta Code
Revision as of 00:32, 14 December 2009 by rosettacode>Kevin Reid
This is an idea for a task, incomplete and with no actual examples, and so it is not yet marked with the task template. —Kevin Reid 00:27, 14 December 2009 (UTC)

Create a well-formatted stem-and-leaf plot from the following data set:

XXX provide some sample data (2-3 digit integers (to avoid discussing rounding) with an interesting distribution)

For general programming languages, take the data set as a list/array of integers, sort it and convert it into the stem-and-leaf structure. For document languages [such as LaTeX, HTML, etc. -- delete this note once such examples are present], present the plot with appropriate layout, spacing, and vertical line; the sorting/grouping of the data values may be hardcoded. Examples may use a programming language to generate output in a document language, or use a graphics toolkit, or any other interesting and practical approach to the result.

The output should, if possible, not be a bitmap image. Monospaced plain text is acceptable.