Milky's note

plotly GitHub에 업로드하기 본문

데이터 분석/관련 내용

plotly GitHub에 업로드하기

밀뿌 2022. 5. 27. 23:10

쇼핑몰 데이터를 분석하고 plotly 라이브러리를 이용해서 funnel plot를 그렸다.

그리고 만족한 결과물을 git에 push하였는데 확인해보니까 빈칸으로 보였다.

 

동적 시각화 그래프라서 올라가지 않았다.

찾아보니 웹에서 Plotly가 현재 iframe을 지원하지 않아서 이러한 일이 발생하였다.

 

그래서 이 문제를 해결할 방법을 정리하려고 한다.

 

엄청 간단하다.

그래프를 출력할 때 다음을 넣어주면 된다!!!

이 한줄로 엄청난 고생을 했다니.... ㅋ

fig.show(renderer="svg")

 

여러 개의 차트를 그릴 때는 다음을 사용하면 된다.

import plotly.io as pio

pio.renderers.default = "svg"

 

 

출처 : https://stackoverflow.com/questions/43562671/plotly-graph-shows-a-blank-space-on-github

 

Plotly graph shows a blank space on GitHub

I am using Plotly to make graphs in my IPython notebook. I am able to view graphs on my IPython notebook when I upload them on GitHub they are displayed as blank spaces. I read on the web that Plo...

stackoverflow.com

 

Comments