Installation of Package for Stem and Leaf Plot

  • Need to install docopt and stemgraphic first
  • To find what packages are installed in conda terminal, type : conda list
  • To find what packages that pip recognizes, type : pip list

Installation for docopt

Go to conda prompt and type conda install -c anaconda docopt

Installation for stemgraphic

Go to conda prompt and type pip install -U stemgraph

In [2]:
import numpy as np
import pandas as pd
import seaborn as sns
In [3]:
import stemgraphic
from stemgraphic import stem_graphic
In [4]:
CS=pd.read_excel("F:/2019 GB Python/Descstats.xlsx") 
In [5]:
CS.head()
Out[5]:
Sample 1 Sample 2 Group Unnamed: 3 Unnamed: 4 Unnamed: 5 Unnamed: 6
0 28.686942 0.627870 A NaN NaN NaN NaN
1 30.811276 50.558054 A NaN NaN NaN NaN
2 28.477675 54.593256 A NaN NaN NaN NaN
3 31.689752 19.613195 A NaN NaN NaN NaN
4 31.132768 48.658675 A NaN NaN NaN NaN
In [7]:
stemgraphic.stem_graphic(CS['Sample 1'], scale = .1)
Out[7]:
(<Figure size 540x1440 with 1 Axes>, <matplotlib.axes._axes.Axes at 0xab060d0>)
In [8]:
stemgraphic.stem_graphic(CS['Sample 1'], scale = 1)
Out[8]:
(<Figure size 540x198 with 1 Axes>, <matplotlib.axes._axes.Axes at 0x5344970>)
In [ ]: