내 데이터 세트 (this seems to still be on open issue)의 처리를 구별하기 위해 여러 색상을 사용하는 산점도 매트릭스를 작성하려면 follow the instructions posted here이어야했습니다.Seaborn PairGrid에 포함시킬 때 kdeplot이 y 축에서 축척 해제되는 이유는 무엇입니까?
내 문제는 내 KDE의 줄거리 중 일부는 y 축 스케일 떨어져 있다는 것입니다 : Leaf area index PairGrid
것은 이것은 "아이리스"데이터 세트를 사용하여 문제의 거의 심각 할 것 같지 않습니다,하지만, 난 여전히 참조 그것은 2, 3 및 4 번째 서브 플로트 (see the PairGrid in this post)에서 발생합니다.
모든 kde 데이터가 서브 슬롯에 맞도록 y 축 스케일을 조정하는 방법은 무엇입니까?
import matplotlib.pyplot as plt
import seaborn as sns
iris = sns.load_dataset("iris")
g = sns.PairGrid(iris, hue='species', size=2)
def f(x, **kwargs):
kwargs.pop("color")
col = next(plt.gca()._get_lines.prop_cycler)['color']
sns.kdeplot(x, color=col, **kwargs)
g.map_diag(f)
g.map_offdiag(plt.scatter)
g.add_legend()
plt.show()
링크 된 질문에 [mcve]가 있습니다. 사용 가능한 코드를 사용하는 대신 재현 할 수없는 코드를 게시하는 이유는 무엇입니까? – ImportanceOfBeingErnest
출력물의 스크린 샷 링크가 포함되어 있으며 원래 코드가 내가 언급 한 다른 게시물에 게시 된 이후에 사용한 코드를 표시하는 것이 적절할 것이라고 생각했습니다. 명백한 혼란에 대해 사과드립니다. –