Python - plotly Graph Objects & Plotly Express로 바그래프 만들어보기

2024. 1. 9. 17:50·Python/데이터 시각화
728x90

plotly에는 Graph Objects & Plotly Express가 있음

 

Graph Objects로 바그래프 만들어보기

import plotly.graph_objects as go

# 데이터 불러오기
y = [3, 10, 6]

#fig = go.Figure() 함수로 기본 그래프 생성
fig = go.figure(
	# 데이터 입력
	data = [go.Bar(y=y)]
)

fig.show()

 

 

 

Plotly Express로 바그래프 만들어보기

import plotly.express as px

y = [3, 10, 6]

# px.bar() 함수를 활용해서 bar chart 생성과 동시에 Data, Layout 값 입력
fig = px.bar(y=y)

fig.show()

728x90

'Python > 데이터 시각화' 카테고리의 다른 글

[개인 프로젝트] 데이터 시각화 및 분석  (0) 2024.01.16
Python - [시각화] regplot, histplot, boxplot, swarmplot, countplot  (1) 2024.01.08
Python - [시각화] scatterplot & 다중차트 그리기 & 그래프 이미지 저장  (1) 2024.01.08
Python - [시각화] Maplotlib Pyplot 모듈 활용 그래프 그리기 (plot / bar)  (1) 2024.01.05
'Python/데이터 시각화' 카테고리의 다른 글
  • [개인 프로젝트] 데이터 시각화 및 분석
  • Python - [시각화] regplot, histplot, boxplot, swarmplot, countplot
  • Python - [시각화] scatterplot & 다중차트 그리기 & 그래프 이미지 저장
  • Python - [시각화] Maplotlib Pyplot 모듈 활용 그래프 그리기 (plot / bar)
GinaKim
GinaKim
안녕하세요! 반갑습니다 :)
  • GinaKim
    디디
    GinaKim
  • 전체
    오늘
    어제
    • 분류 전체보기 (91)
      • Python (43)
        • Python 기초문법 (25)
        • 데이터 시각화 (5)
        • 통계 (8)
        • 크롤링 (5)
      • git (5)
      • streamlit (5)
      • django (5)
      • 머신러닝 (18)
      • Spark (4)
      • Google Cloud Platform (8)
      • Tableau (0)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

  • 공지사항

  • 인기 글

  • 태그

  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.0
GinaKim
Python - plotly Graph Objects & Plotly Express로 바그래프 만들어보기
상단으로

티스토리툴바