• 카테고리

    질문 & 답변
  • 세부 분야

    데이터 분석

  • 해결 여부

    미해결

swarmplot 그려지는 영역값 확인 질문드립니다.

20.10.24 22:47 작성 조회수 175

1

하나씩 복습을 하면서 코드들을 확인하고 있는데 다른 차트는 오류나 워닝이 없이 잘 실행이 됩니다.

swarnplot 인 경우에만 plt.figure(figsize=()) 조정을 하면서 차트를 다시 그려봐도 아래와 같이오류의 갯수만 늘었다 줄었다 할뿐 워닝이 사라지지 않습니다.

워닝의 원인이 무엇이고 워닝 없이 차트를 그리려면  어떻게 조정을 하는게 좋은지 문의 드립니다.


<textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="box-sizing:border-box;font:inherit;margin:0px;overflow:auto;position:absolute;bottom:-1em;padding:0px;width:1000px;height:1em;outline:none"></textarea>
C:\ProgramData\Anaconda3\lib\site-packages\seaborn\categorical.py:1296: UserWarning: 5.4% of the points cannot be placed; you may want to decrease the size of the markers or use stripplot.
  warnings.warn(msg, UserWarning)
C:\ProgramData\Anaconda3\lib\site-packages\seaborn\categorical.py:1282: RuntimeWarning: invalid value encountered in less
  off_low = points < low_gutter
C:\ProgramData\Anaconda3\lib\site-packages\seaborn\categorical.py:1286: RuntimeWarning: invalid value encountered in greater
  off_high = points > high_gutter

답변 1

답변을 작성해보세요.

0

안녕하세요.

swarmplot을 범주형 데이터 값에 대한 점을 하나씩 겹치지 않게 표현하게 됩니다.

그런데 그래프에서 그릴 수 있는 면적을 벗어나게 되면 표시를 할 수 없기 때문에(겹쳐서 표현되게 됩니다.)

점의 size를 줄이라고 경고 메시지가 출력되게 됩니다.

size=1 로 옵션을 추가해 보시면 점을 작게 줄이고 경고 메시지가 사라질 것입니다.

그리고 데이터의 수에 맞게 size를 조정해 보시면 됩니다.