Plotly
고수준 코드High-level code오픈소스 인터랙티브 차트 라이브러리와 Dash 프레임워크로, 현재 plotly.py 7과 plotly.js 4 세대입니다Open-source interactive charting libraries and the Dash framework, now at plotly.py 7 and plotly.js 4
현재 버전Current version: 7.1.0 (plotly.js 4.1.2), 정보 확인일 2026-10-24facts checked 2026-10-24
개요Overview
Plotly는 인터랙티브 차트를 만드는 오픈소스 그래핑 라이브러리 묶음입니다. 핵심은 브라우저에서 차트를 그리는 JavaScript 라이브러리 plotly.js이고, Python용 plotly.py와 R, Julia 등에서 이를 감싸서 사용합니다. 모든 차트에서 호버로 값 확인, 확대와 이동, 범례 클릭으로 시리즈 켜고 끄기가 기본으로 동작합니다.
Plotly is a family of open-source graphing libraries for interactive charts. The core is plotly.js, a JavaScript library that draws charts in the browser, and plotly.py for Python plus packages for R, Julia and other languages wrap it. In every chart, hover for values, zoom and pan, and toggling series from the legend work by default.
Python에서는 Plotly Express가 가장 쉬운 입구입니다. 데이터프레임과 열 이름을 넘기면 함수 한 번으로 산점도, 막대, 지도, 선버스트 같은 차트가 나옵니다. 세밀한 제어가 필요하면 Graph Objects를 쓰고, 분석 웹 앱이 필요하면 같은 회사의 오픈소스 프레임워크 Dash로 JavaScript 없이 Python만으로 대시보드를 만듭니다.
In Python, Plotly Express is the easiest entry point. Pass a dataframe and column names and one function call gives a scatterplot, bar chart, map or sunburst. Use Graph Objects when you need fine control, and use Dash, the company's open-source framework, to build dashboards with Python alone and no JavaScript.
2026년에는 plotly.py가 7, plotly.js가 4로 둘 다 메이저 버전이 올라갔습니다. 정적 이미지 내보내기, 지도 차트, 색상 문자열 형식 등에서 옛 코드가 깨지는 변경이 있어서, 2025년 이전 예제를 그대로 복사하면 오류가 날 수 있습니다.
In 2026 both libraries moved to new major versions: plotly.py 7 and plotly.js 4. Changes to static image export, map charts and colour string formats break older code, so copying an example from before 2025 can fail.
2026년 현재What's new in 2026
- 최신 버전은 plotly.py 7.1.0(2026-09-15), plotly.js 4.1.2(2026-10-05)입니다. plotly.py 7.0.0은 2026-08-25, plotly.js 4.0.0은 2026-08-24에 나왔고 라이선스는 모두 MIT입니다.
- The current versions are plotly.py 7.1.0 (2026-09-15) and plotly.js 4.1.2 (2026-10-05). plotly.py 7.0.0 came out on 2026-08-25 and plotly.js 4.0.0 on 2026-08-24, all under the MIT license.
- 정적 이미지 내보내기는 Kaleido 1.0 이상만 지원합니다. Kaleido 1.0 미만과 Orca 지원이 제거되었고
write_image()등의engine인자도 없어졌습니다. - Static image export now supports Kaleido 1.0 or later only. Support for Kaleido below 1.0 and for Orca was removed, and the
engineargument ofwrite_image()and related functions is gone. - Mapbox 기반 트레이스(
scattermapbox,choroplethmapbox,densitymapbox)와mapbox서브플롯,mapboxAccessToken설정이 제거되었습니다.px.scatter_map같은map계열을 사용합니다. - Mapbox-based traces (
scattermapbox,choroplethmapbox,densitymapbox), themapboxsubplot and themapboxAccessTokenoption were removed. Use themapfamily such aspx.scatter_map. figure_factory의create_*함수 12개(create_distplot,create_gantt,create_candlestick,create_violin등)가 제거되었습니다. 오래된 튜토리얼에서 가장 흔히 만나는 오류 원인입니다.- Twelve
figure_factorycreate_*functions, includingcreate_distplot,create_gantt,create_candlestickandcreate_violin, were removed. They are the most common cause of errors in older tutorials. - plotly.js 4에는 벡터장을 화살표로 그리는
quiver트레이스와 Plotly Cloud로 공유 링크를 만드는 "Share Chart" 모드바 버튼이 추가되었습니다. MathJax v2 지원은 끝나고 v4를 지원합니다. - plotly.js 4 adds a
quivertrace that draws vector fields as arrows and a "Share Chart" modebar button that creates a sharing link through Plotly Cloud. MathJax v2 support ended and v4 is supported. - 색상 문자열 처리 라이브러리가 바뀌어 0에서 1 사이 소수를 쓰는
rgb()문자열과hsv()문자열은 더 이상 지원되지 않습니다. - The colour parsing library changed, so
rgb()strings with 0 to 1 decimal fractions andhsv()strings are no longer supported. - plotly.py 7.1.0은
density_heatmap과density_contour의 주변 히스토그램에histfunc와z집계를 적용하고,mpl_to_plotly의 변환 누락을 줄였습니다. Dash 안정 버전은 4.4.1(2026-07-21)입니다. - plotly.py 7.1.0 applies
histfuncandzaggregation to marginal histograms indensity_heatmapanddensity_contour, andmpl_to_plotlydrops fewer matplotlib elements. The stable Dash version is 4.4.1 (2026-07-21). - 릴리스 노트에서 확인된 AI 기능은 없습니다. LLM이 쓴 Plotly 코드는 옛 API(
orca,mapbox,create_*)를 섞는 일이 있으므로 설치된 버전에서 실행해 확인해야 합니다. - No AI features were found in the release notes. Plotly code written by an LLM sometimes mixes in old APIs (
orca,mapbox,create_*), so run it on your installed version.
강점Strengths
- 모든 차트가 기본으로 인터랙티브합니다(호버, 확대와 이동, 선택, 범례 토글).
- Every chart is interactive by default (hover, zoom and pan, selection, legend toggles).
- Plotly Express는 짧은 코드로 일반 차트를 만들고, Graph Objects는 모든 요소를 제어합니다.
- Plotly Express makes common charts in a few lines, and Graph Objects controls every element.
- 3D 산점도와 표면, 등고선, 평행 좌표, 샌키, 트리맵, 선버스트처럼 폭넓은 차트 유형을 지원합니다.
- Chart coverage is broad: 3D scatter and surface, contour, parallel coordinates, Sankey, treemap and sunburst.
- Jupyter에 바로 표시되고, HTML 파일 하나로 내보내 공유할 수 있습니다.
- Charts show directly in Jupyter and export to a single shareable HTML file.
- WebGL 트레이스(예:
scattergl)로 점이 많은 산점도도 부드럽게 다룹니다. - WebGL traces such as
scatterglkeep scatterplots with many points responsive. - Dash로 Python만으로 필터와 콜백이 있는 웹 대시보드를 만듭니다.
- Dash builds web dashboards with filters and callbacks using Python alone.
- MIT 라이선스의 오픈소스이고 릴리스가 활발합니다.
- It is open source under the MIT license, with active releases.
한계Limitations
- 메이저 버전 변경이 잦아 인터넷의 예제와 AI가 만든 코드가 현재 버전과 맞지 않을 수 있습니다.
- Major version changes are frequent, so examples online and AI-generated code may not match the current version.
- 정적 이미지(PNG, SVG, PDF) 내보내기는 Kaleido 1.0 이상이 필요하며, Kaleido가 내부적으로 쓰는 브라우저 엔진 설치 문제로 막히는 경우가 있습니다.
- Static image export (PNG, SVG, PDF) needs Kaleido 1.0 or later, and problems installing the browser engine that Kaleido uses can block it.
- 전체 plotly.js 번들은 크기가 큽니다. 부분 번들로 줄일 수 있지만 추가 작업이 필요합니다.
- The full plotly.js bundle is large. Partial bundles can reduce it, at the cost of extra work.
- 출판용 정적 그림에서는 스타일 지정이 ggplot2나 Matplotlib보다 장황하게 느껴질 수 있습니다.
- For static publication figures, styling can feel more verbose than in ggplot2 or Matplotlib.
- Plotly Express와 Graph Objects의 인자가 완전히 일치하지 않아 전환할 때 헷갈릴 수 있습니다.
- Arguments in Plotly Express and Graph Objects do not match exactly, which can confuse you when switching.
- 복잡한 대시보드는 Dash 서버와 콜백 설계가 필요해 단순 차트보다 개발 부담이 큽니다.
- Complex dashboards need a Dash server and callback design, a heavier effort than a single chart.
이런 용도에 최적Best For
Plotly는 Python이나 R로 분석하면서 호버와 확대가 되는 차트를 노트북이나 HTML로 바로 공유하고 싶을 때 잘 맞습니다. 3D 표면, 등고선, 지도 같은 과학 및 지리 시각화와, 비즈니스 지표를 보여 주는 Dash 대시보드에도 적합합니다.
Plotly fits when you analyse in Python or R and want to share charts with hover and zoom through a notebook or an HTML file. It also suits scientific and geographic visualization, such as 3D surfaces, contours and maps, and Dash dashboards for business metrics.
논문에 들어갈 정적 그림이 목적이라면 ggplot2나 Matplotlib가 더 편할 수 있습니다. 코드로 완전히 새로운 시각 형식을 만들려면 D3가 맞습니다.
If the goal is a static figure for a paper, ggplot2 or Matplotlib can be easier. To build a completely new visual form in code, D3 is the better fit.
시작하기Getting Started
- Python 3 환경을 준비하고
pip install plotly pandas를 실행합니다. 정적 이미지가 필요하면pip install "kaleido>=1.0"도 설치합니다. - Prepare a Python 3 environment and run
pip install plotly pandas. If you need static images, also installpip install "kaleido>=1.0". - 아래 Plotly Express 코드를 Jupyter나 스크립트에서 실행해 호버와 확대를 확인합니다.
- Run the Plotly Express code below in Jupyter or a script and try hover and zoom.
- 더 세밀한 제어가 필요한 부분은 Graph Objects로 바꿔 씁니다.
- Switch to Graph Objects for the parts that need finer control.
fig.write_html()로 공유용 HTML을 만들고, 정적 이미지는fig.write_image()로 저장합니다. Kaleido 1.x가 로컬 Chrome 또는 Chromium을 요구하면 설치 안내에 따라 준비합니다.- Create a shareable file with
fig.write_html()and save static images withfig.write_image(). If Kaleido 1.x asks for a local Chrome or Chromium, set one up following its instructions.
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.update_layout(template="plotly_white")
fig.show()
fig.write_html("gapminder.html")
fig.write_image("gapminder.png", scale=2) # needs kaleido>=1.0
Graph Objects로 같은 차트를 직접 구성할 수도 있습니다.
You can also build a chart directly with 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()
지원 차트 유형Supported Chart Types
Plotly는 막대 차트, 누적 막대 차트, 선 그래프, 영역 그래프, 산점도, 버블 차트, 히스토그램, 히트맵, 상자 그림, 바이올린 플롯, 파이와 도넛 차트, 선버스트, 트리맵, 샌키 다이어그램, 평행 좌표, 레이더(극좌표) 차트, 코로플레스 지도와 산점 지도, 3D 산점도와 표면, 등고선, 퍼널, 폭포, 캔들스틱과 OHLC, 간트(timeline), 삼원 플롯, 게이지(indicator)를 지원합니다. plotly.js 4부터는 벡터장을 위한 quiver 트레이스도 있습니다.
Plotly supports bar charts, stacked bar charts, line graphs, area graphs, scatterplots, bubble charts, histograms, heatmaps, box plots, violin plots, pie and donut charts, sunburst, treemap, Sankey diagrams, parallel coordinates, radar (polar) charts, choropleth and scatter maps, 3D scatter and surface plots, contours, funnel, waterfall, candlestick and OHLC, Gantt (timeline), ternary plots and gauges (indicator). Since plotly.js 4 there is also a quiver trace for vector fields.