HAHS.
도구로 돌아가기

Plotly

high-level-code
open-source web PythonRJavaScriptJulia

Overview

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.

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 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)
  • Multi-language support: Python, R, JavaScript, Julia, MATLAB
  • Plotly Express provides ggplot2-level conciseness for Python users
  • Excellent 3D visualization support (3D scatter, surface, mesh)
  • WebGL renderer handles hundreds of thousands of points smoothly
  • Wide chart type coverage including scientific and statistical charts
  • Dash framework extends Plotly into full interactive web applications
  • Native Jupyter notebook integration with inline rendering
  • Export to static images (PNG, SVG, PDF) via Kaleido
  • Active development with frequent releases and responsive GitHub issues

Limitations

  • Bundle size is large (~3.5MB minified) for the JavaScript library
  • Complex interactive dashboards require Dash (which adds a Python server dependency)
  • Styling and theming can be verbose compared to ggplot2
  • Some chart types have inconsistent APIs between Express and Graph Objects
  • Offline rendering for static export requires the Kaleido package
  • Community edition lacks some features available in the commercial Plotly Chart Studio
  • Performance with very large datasets (>500K points) requires careful WebGL usage
  • Learning curve when transitioning from Express to Graph Objects API

Best For

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

Install the Python library:

pip install plotly

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()

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 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.