본문 바로가기

python/Matplotlib

Plotting with keyword strings

import matplotlib.pyplot as plt
import numpy as np

data = {'a': np.arange(50),
'c': np.random.randint(0, 50, 50),
'd': np.random.randn(50)}
data['b'] = data['a'] + 10 * np.random.randn(50)
data['d'] = np.abs(data['d']) * 100
plt.scatter('a', 'b', c='c', s='d', data=data)
plt.xlabel('entry a')
plt.ylabel('entry b')
plt.show()

 

'python > Matplotlib' 카테고리의 다른 글

1차함수  (0) 2021.07.25
Plotting with categorical variables  (0) 2021.07.19
삼각형, 사각형, 점선 그래프  (0) 2021.07.19
점 그래프  (0) 2021.07.19
pyplot_2  (0) 2021.07.19