In [1]:
!/usr/local/bin/pip3 freeze | grep stemgraphic
In [2]:
%matplotlib inline
import stemgraphic
import matplotlib.pyplot as plt
In [3]:
help(stemgraphic)
In [4]:
!stem -h
In [5]:
!ls *.xlsx
In [6]:
!stem excel_test.xlsx
In [7]:
!stem excel_test.xlsx -c 7
In [8]:
from stemgraphic import *
In [9]:
dir()
Out[9]:
In [10]:
x = [
12, 127, 28, 42, 39, 113, 42, 18, 44, 118, 44, 37, 113, 124, 37, 48, 127, 36, 29, 31,
125, 139, 131, 115, 105, 132, 104, 123, 35, 113, 122, 42, 117, 119, 58, 109, 23, 105,
63, 27, 44, 105, 99, 41, 128, 121, 116, 125, 32, 61, 37, 127, 29, 113, 121, 58, 114,
126, 53, 114, 96, 25, 109, 7, 31, 141, 46, 13, 27, 43, 117, 116, 27, 7, 68, 40, 31, 115,
124, 42, 128, 52, 71, 118, 117, 38, 27, 106, 33, 117, 116, 111, 40, 119, 47, 105, 57,
122, 109, 124, 115, 43, 120, 43, 27, 27, 18, 28, 48, 125, 107, 114, 34, 133, 45, 120,
30, 127, 31, 116, 146
]
In [11]:
fig, ax = stem_graphic(x)
fig.savefig('1.png')
fig.savefig('1.svg')
In [12]:
import numpy as np
In [13]:
x = np.arange(150)**2
In [14]:
stem_graphic(x, aggregation=False, outliers=False, legend_pos=None,
delimiter_color='k', alpha=0, underline_color='orange')
Out[14]:
In [15]:
f, ax = stem_hist(x, color='k')
In [16]:
f.savefig('stem_hist.pdf', transparent=True)
In [17]:
%load_ext rpy2.ipython
In [18]:
%%R
data(mtcars)
car_weight <- mtcars$wt
data(quakes)
In [19]:
%Rpull car_weight quakes
In [20]:
stem_graphic(quakes.depth)
Out[20]:
In [21]:
stem_graphic(car_weight)
Out[21]:
In [22]:
%load_ext coconut
In [23]:
%%coconut
from random import sample
from stemgraphic import stem_graphic
# Build a pipeline.
(quakes.depth |> list, 100) |*> sample |> list |> stem_graphic
Out[23]:
In [ ]: