import numpy
as np
import pandas
as pd
import matplotlib
.pyplot
as plt
% matplotlib inline
plt
.plot
([i
**2 for i
in range(100)],
linestyle
= '-.')
[<matplotlib.lines.Line2D at 0x1dedd1d1518>]
df
= pd
.DataFrame
(np
.random
.randn
(1000))
df
.plot
(kind
= 'kde', linestyle
= ':')
<matplotlib.axes._subplots.AxesSubplot at 0x1dedd227978>
s
= pd
.Series
(np
.random
.randn
(100).cumsum
())
s
.plot
(linestyle
= '--', linewidth
= 0.5,alpha
= 0.5,
marker
= '>')
'''
.
,
o
v
<
>
1
2
3
4
s
p
*
h
H
+
x
D
d
|
-
'''
'\n.\n,\no\nv\n<\n>\n1\n2\n3\n4\ns\np\n*\nh\nH\n+\nx\nD\nd\n|\n-\n'
x
= np
.random
.randn
(1000)
y
= np
.random
.randn
(1000)
plt
.scatter
(x
, y
, marker
= '.', s
= 10, alpha
= 0.2)
plt
.xkcd
()
plt
.hist
(np
.random
.randn
(1000),
color
= 'r', alpha
= 0.7)
df
= pd
.DataFrame
(np
.random
.randn
(1000, 4), columns
= list('ABCD'))
df
= df
.cumsum
()
df
.plot
(style
= '--.', alpha
= 0.8, colormap
= 'GnBu')
<matplotlib.axes._subplots.AxesSubplot at 0x1dedf5543c8>
ts
= pd
.Series
(np
.random
.randn
(1000).cumsum
(), index
= pd
.date_range
('1/1/2019', periods
= 1000))
ts
.plot
(grid
= True, figsize
= (10, 2),
style
= '--.g')
<matplotlib.axes._subplots.AxesSubplot at 0x1dedf4b6908>
plt
.xkcd
()
import matplotlib
.style
as psl
print(plt
.style
.available
)
psl
.use
('seaborn-deep')
ts
= pd
.Series
(np
.random
.randn
(1000).cumsum
(), index
= pd
.date_range
('1/1/2019',periods
= 1000))
ts
.plot
(style
= '--g.', grid
= True, figsize
= (10, 6))
['bmh', 'classic', 'dark_background', 'fast', 'fivethirtyeight', 'ggplot', 'grayscale', 'seaborn-bright', 'seaborn-colorblind', 'seaborn-dark-palette', 'seaborn-dark', 'seaborn-darkgrid', 'seaborn-deep', 'seaborn-muted', 'seaborn-notebook', 'seaborn-paper', 'seaborn-pastel', 'seaborn-poster', 'seaborn-talk', 'seaborn-ticks', 'seaborn-white', 'seaborn-whitegrid', 'seaborn', 'Solarize_Light2', 'tableau-colorblind10', '_classic_test']
<matplotlib.axes._subplots.AxesSubplot at 0x1dedfd70cc0>