stemgraphic icon indicating copy to clipboard operation
stemgraphic copied to clipboard

Order of lower-resolution values is wrong in one of gallery examples

Open itamarst opened this issue 7 years ago • 6 comments

Just discovered this package, excited someone has implemented it!

From the gallery, http://stemgraphic.org/galleries/test_aczel_seaborn.png suggests a mistake.

Notice how it goes 602 and then 66. But the main thrust of numbers is from lower at bottom (1 prefix) to higher at top (6). So I would expect it to be first 66 and then 602.

First 602 and then 66 and would make sense for diagram where lower values were on top and higher values on bottom.

itamarst avatar Oct 18 '18 17:10 itamarst

Hi, Thanks for trying out stemgraphic. That plot was generated from data in "Complete Business Statistics" by Amir Aczel:

#Dataset from Aczel, task performance time on p. 721
x = [
    11, 12, 12, 13, 15, 15, 15, 16, 17, 20, 21, 21, 21, 22, 22, 22, 23, 24, 26, 27, 27, 27, 28, 29, 29, 30,
    31, 32, 34, 35, 37, 41, 41, 42, 45, 47, 50, 52, 53, 56, 60, 62
]

the break with a lone 6 represents 56, so it is in the correct order. Without an indication, the secondary line is hard to attribute to the right stem, and your comment just reinforces the studies I've done in that regard. I'm still investigating a good way to label the secondary (or in the case of the 5 split, even more so important to label).

fdion avatar Jan 05 '19 17:01 fdion

Maybe just repeat each number twice? Bit denser, but a lot less ambiguous.

6|
6|02
5|6
5|023

itamarst avatar Jan 05 '19 23:01 itamarst

That is one approach. I think for a 2 split, that works well enough. There is also the 5 split. Tukey approached this using letters, and I seem to remember * and . but nowadays we do have Unicode (⮣, U2ba3). Perhaps something like:

⮣|6
5|023

and for 5 split

⮣|
⮣|6
⮣|
⮣|23
5|0

And if the order is descending use ↳ (U21b3)

fdion avatar Jan 06 '19 14:01 fdion

The 5 split feels like overkill to be on every line though...

fdion avatar Jan 06 '19 14:01 fdion

Maybe could replace the border line with up-turn and down-turn arrows at top and bottom edges? And still have straight line for rows in between.

itamarst avatar Jan 06 '19 16:01 itamarst

Why are the leaves for each stem spread across two lines? There are 6 stems spread across 11 lines.

Michael-Covell avatar Dec 29 '23 15:12 Michael-Covell