Re: Stem and Leaf Question
- To: mathgroup at smc.vnet.net
- Subject: [mg110947] Re: Stem and Leaf Question
- From: Darren Glosemeyer <darreng at wolfram.com>
- Date: Tue, 13 Jul 2010 05:27:10 -0400 (EDT)
jroge wrote: > I am creating some basic stem and leaf plots. I would like to reverse > the order of the stems in the output so they are decreasing from high > to low rather than the usual low to high. I have not been able to find > any documentation in the help system that explains how to reverse that > order. I have tried the reverse function but that doesn't seem > compatible. > > There currently isn't a built-in control for this, but the effect can be obtained by replacing the entries in the output by reversed entries. The following shows how that could be done. In[1]:= << StatisticalPlots` In[2]:= sldata = {1, 3.2, 3.1, 4.556, 5.7345}; In[3]:= slp = StemLeafPlot[sldata]; In[4]:= slp[[1, 1, 1, 1, 2 ;; All]] = Reverse[slp[[1, 1, 1, 1, 2 ;; All]]]; In[5]:= slp Out[5]= Stem Leaves 5 7 4 6 3 12 1 0 Stem units: 1 Is this a common thing to want for stem and leaf plots? If so, perhaps it would be useful for us to add an option to the function. Darren Glosemeyer Wolfram Research