같은 것입니다 :
import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd
%matplotlib inline
데이터 :
label price growth
0 A 90.0 0.10
1 B 32.0 0.32
2 C 3.0 0.22
3 D 0.3 0.16
4 E 1.0 0.10
플롯 :
ax = sns.lmplot('price', # Horizontal axis
'growth', # Vertical axis
data=data, # Data source
fit_reg=False, # Don't fix a regression line
size = 5,
aspect =1) # size and dimension
plt.title('Example Plot')
# Set x-axis label
plt.xlabel('price')
plt.xscale('log')
# Set y-axis label
plt.ylabel('growth')
def label_point(x, y, val, ax):
a = pd.concat({'x': x, 'y': y, 'val': val}, axis=1)
for i, point in a.iterrows():
ax.text(point['x']+.02, point['y'], str(point['val']))
label_point(data.price, data.growth, data.label, plt.gca())
내가 원하는 것은 가격이 로그 스케일이다, 그 이유는 아주 작은 –
에서 글꼴 내가 asumming'PLT .scatter()'해결책 –
단지 플롯의 크기와 양을 변경하십시오. – Gayatri