2
나는 패싯 격자의 모든 패널 위에 화살표를 그립니다. 이 더미 예에서 seaborn facetGrid를 통해 아티스트를 그립니다.
, 나는 모든 패널에서 같은 화살표를 그리려고 :에 ValueError :
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pylab as plt
datDf=pd.DataFrame({'values':np.random.randint(0,100,100)})
datDf['group']=np.random.randint(0,5,100)
g = sns.FacetGrid(datDf, col="group",
col_wrap=3,
size=4.5,
sharex=True, sharey=True, despine=False)
g.map(plt.plot,'values')
for ax in g.axes:
arrow=plt.arrow(0,0,50,50,width=5,
length_includes_head=True,
head_width=5*2,
color='gray')
ax.add_artist(arrow)
는이 오류를 수신하고 축을 재설정 할 수 없습니다. 지원되지 않는 하나 이상의 축에서 아티스트를 재사용하려하고 있습니다.
facetGrid에 아티스트를 그리는 올바른 방법은 무엇입니까?
http://seaborn.pydata.org/tutorial/axis_grids.html#mapping-custom-functions-onto-the-grid –