개요 / Overview
Plotly는 Python, R, JavaScript, Julia에서 인터랙티브한 브라우저 기반 시각화를 만들어내는 오픈소스 그래핑 라이브러리입니다. D3.js와 WebGL 위에 구축되어, 고수준 API의 편리함과 웹 네이티브 렌더링의 인터랙티브함을 결합합니다. 모든 Plotly 차트는 기본적으로 인터랙티브합니다 — 사용자는 호버로 세부 정보를 확인하고, 확대/축소하고, 이동하고, 데이터 포인트를 선택하고, 시리즈를 켜고 끌 수 있습니다.
Plotly is an open-source graphing library that produces interactive, browser-based visualizations from Python, R, JavaScript, or Julia. Built on top of D3.js and WebGL, it combines the convenience of a high-level API with the interactivity of web-native rendering. Every Plotly chart is interactive by default — users can hover for details, zoom, pan, select data points, and toggle series on and off.
Python 라이브러리인 Plotly.py는 일반적인 차트 유형에 대해 ggplot2와 비슷한 간결한 API를 제공하는 Plotly Express 서브모듈 덕분에 데이터 과학 커뮤니티에서 특히 인기를 얻었습니다. 함수 호출 한 번으로 완전히 인터랙티브한 차트를 만들 수 있습니다. 더 복잡한 요구에는 Graph Objects API가 모든 요소에 대한 세밀한 제어를 제공합니다.
The Python library, Plotly.py, has become particularly popular in the data science community thanks to its Plotly Express sub-module, which provides a ggplot2-like concise API for common chart types. A single function call can produce a fully interactive chart. For more complex needs, the Graph Objects API offers fine-grained control over every element.
Plotly는 또한 JavaScript를 작성하지 않고도 Python으로 완전한 분석용 웹 애플리케이션을 만들 수 있는 오픈소스 프레임워크인 Dash도 유지관리합니다. 차트용 Plotly와 애플리케이션용 Dash의 조합은 빠른 Jupyter 탐색부터 프로덕션 대시보드까지 아우르는 완전한 인터랙티브 데이터 시각화 생태계를 만들어냈습니다.
Plotly also maintains Dash, an open-source framework for building full analytical web applications in Python without writing JavaScript. The combination of Plotly for charts and Dash for applications has created a complete ecosystem for interactive data visualization, from quick Jupyter explorations to production dashboards.
강점 / Strengths
- 모든 차트가 기본적으로 인터랙티브합니다(호버, 확대/축소, 이동, 선택)
- Every chart is interactive out of the box (hover, zoom, pan, selection)
- 다중 언어 지원: Python, R, JavaScript, Julia, MATLAB
- Multi-language support: Python, R, JavaScript, Julia, MATLAB
- Plotly Express는 Python 사용자에게 ggplot2 수준의 간결함을 제공합니다
- Plotly Express provides ggplot2-level conciseness for Python users
- 뛰어난 3D 시각화 지원(3D 산점도, 표면, 메시)
- Excellent 3D visualization support (3D scatter, surface, mesh)
- WebGL 렌더러가 수십만 개의 포인트를 매끄럽게 처리합니다
- WebGL renderer handles hundreds of thousands of points smoothly
- 과학용 및 통계용 차트를 포함한 폭넓은 차트 유형 지원
- Wide chart type coverage including scientific and statistical charts
- Dash 프레임워크가 Plotly를 완전한 인터랙티브 웹 애플리케이션으로 확장합니다
- Dash framework extends Plotly into full interactive web applications
- 인라인 렌더링을 지원하는 네이티브 Jupyter 노트북 통합
- Native Jupyter notebook integration with inline rendering
- Kaleido를 통한 정적 이미지(PNG, SVG, PDF) 내보내기
- Export to static images (PNG, SVG, PDF) via Kaleido
- 잦은 릴리스와 신속한 GitHub 이슈 대응을 특징으로 하는 활발한 개발
- Active development with frequent releases and responsive GitHub issues
한계 / Limitations
- JavaScript 라이브러리의 번들 크기가 큽니다(minified 기준 약 3.5MB)
- Bundle size is large (~3.5MB minified) for the JavaScript library
- 복잡한 인터랙티브 대시보드에는 Dash가 필요합니다(이는 Python 서버 의존성을 추가합니다)
- Complex interactive dashboards require Dash (which adds a Python server dependency)
- 스타일링과 테마 설정이 ggplot2에 비해 장황할 수 있습니다
- Styling and theming can be verbose compared to ggplot2
- 일부 차트 유형은 Express와 Graph Objects 사이에서 API가 일관되지 않습니다
- Some chart types have inconsistent APIs between Express and Graph Objects
- 정적 내보내기를 위한 오프라인 렌더링에는 Kaleido 패키지가 필요합니다
- Offline rendering for static export requires the Kaleido package
- 커뮤니티 에디션에는 상용 Plotly Chart Studio에서 제공되는 일부 기능이 빠져 있습니다
- Community edition lacks some features available in the commercial Plotly Chart Studio
- 매우 큰 데이터셋(50만 포인트 초과)에서의 성능을 위해서는 WebGL 사용에 세심한 주의가 필요합니다
- Performance with very large datasets (>500K points) requires careful WebGL usage
- Express에서 Graph Objects API로 전환할 때 학습 곡선이 존재합니다
- Learning curve when transitioning from Express to Graph Objects API
이런 용도에 최적 / Best For
Plotly는 여러 프로그래밍 언어에 걸쳐 작동하는 인터랙티브 차트가 필요할 때 최선의 선택입니다. Jupyter 친화적인 인터랙티브 차트를 원하는 Python 데이터 과학자, (Dash를 통해) 분석용 대시보드를 구축해야 하는 팀, 그리고 3D 표면 플롯, 등고선 플롯, 평행 좌표 플롯이 필요한 과학 컴퓨팅에 이상적입니다. 시각화가 반드시 인터랙티브해야 하고 팀이 Python을 사용한다면, Plotly는 선두 옵션입니다.
Plotly is the best choice when you need interactive charts that work across multiple programming languages. It is ideal for data scientists in Python who want Jupyter-friendly interactive charts, for teams that need to build analytical dashboards (via Dash), and for scientific computing where 3D surface plots, contour plots, or parallel coordinates are required. If your visualization must be interactive and your team uses Python, Plotly is the leading option.
시작하기 / Getting Started
Python 라이브러리를 설치합니다:
Install the Python library:
pip install plotly
Plotly Express로 인터랙티브 차트를 만듭니다:
Create an interactive chart with Plotly Express:
import plotly.express as px
df = px.data.gapminder().query("year == 2007")
fig = px.scatter(
df,
x="gdpPercap",
y="lifeExp",
size="pop",
color="continent",
hover_name="country",
log_x=True,
size_max=60,
title="GDP per Capita vs Life Expectancy (2007)"
)
fig.show()
더 세밀한 제어가 필요하면 Graph Objects를 사용합니다:
For more control, use Graph Objects:
import plotly.graph_objects as go
fig = go.Figure()
fig.add_trace(go.Scatter(
x=[1, 2, 3, 4],
y=[10, 15, 13, 17],
mode="lines+markers",
name="Series A"
))
fig.update_layout(title="Custom Chart", template="plotly_white")
fig.show()
정적 이미지로 내보내기:
Export to static image:
fig.write_image("chart.svg") # requires kaleido
지원 차트 유형 / Supported Chart Types
Plotly는 이용 가능한 것 중 가장 폭넓은 차트 유형 선택지를 제공합니다: 막대 차트, 누적 막대 차트, 선 그래프, 영역 그래프, 산점도, 버블 차트, 히스토그램, 히트맵, 박스 플롯, 바이올린 플롯, 파이 차트, 도넛 차트, 선버스트 다이어그램, 트리맵, 샌키 다이어그램, 평행 좌표 플롯, 레이더(극좌표) 차트, 코로플레스 맵, 산점 지도, 밀도 지도, 3D 산점도, 3D 표면 플롯, 3D 메시 플롯, 등고선 플롯, 퍼널 차트, 폭포 차트, OHLC/캔들스틱 차트, (타임라인을 통한) 간트 차트, 삼원 플롯, 카펫 플롯, 인디케이터/게이지 차트가 있습니다. 눈에 띄게 빠진 것은 네트워크 다이어그램(Dash Cytoscape가 이 공백을 메우긴 합니다)과 워드 클라우드입니다.
Plotly offers one of the broadest chart type selections available: bar charts, stacked bar charts, line graphs, area graphs, scatterplots, bubble charts, histograms, heatmaps, box plots, violin plots, pie charts, donut charts, sunburst charts, treemaps, Sankey diagrams, parallel coordinates, radar (polar) charts, choropleth maps, scatter maps, density maps, 3D scatter plots, 3D surface plots, 3D mesh plots, contour plots, funnel charts, waterfall charts, OHLC/candlestick charts, Gantt charts (via timeline), ternary plots, carpet plots, and indicator/gauge charts. Notably absent are network diagrams (though Dash Cytoscape fills this gap) and word clouds.