{"id":31363814,"url":"https://github.com/yhisaki/plotly.cpp","last_synced_at":"2026-05-14T12:35:50.726Z","repository":{"id":315929771,"uuid":"1061262579","full_name":"yhisaki/plotly.cpp","owner":"yhisaki","description":"📈 plotly.cpp: A C++ plotting library for expressive, interactive, real-time and streaming data visualization","archived":false,"fork":false,"pushed_at":"2025-10-18T07:28:42.000Z","size":54011,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-19T04:49:11.172Z","etag":null,"topics":["animation","cpp","physics-simuation","plot","plotly","plots","real-time","robotics","scatter-plot","visualisation"],"latest_commit_sha":null,"homepage":"https://yhisaki.github.io/plotly.cpp/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yhisaki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-21T15:14:25.000Z","updated_at":"2025-10-18T07:28:45.000Z","dependencies_parsed_at":"2025-09-21T18:39:22.340Z","dependency_job_id":"e9242796-6aeb-48e9-af92-7c73de47e6fa","html_url":"https://github.com/yhisaki/plotly.cpp","commit_stats":null,"previous_names":["yhisaki/plotly.cpp"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/yhisaki/plotly.cpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhisaki%2Fplotly.cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhisaki%2Fplotly.cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhisaki%2Fplotly.cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhisaki%2Fplotly.cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yhisaki","download_url":"https://codeload.github.com/yhisaki/plotly.cpp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhisaki%2Fplotly.cpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33025299,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["animation","cpp","physics-simuation","plot","plotly","plots","real-time","robotics","scatter-plot","visualisation"],"created_at":"2025-09-27T05:22:09.287Z","updated_at":"2026-05-14T12:35:50.611Z","avatar_url":"https://github.com/yhisaki.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e🚀 Plotly.cpp\u003c/h1\u003e\n  \u003cp\u003e\u003cstrong\u003eA C++ plotting library for expressive, interactive, real-time \u0026 streaming data visualization\u003c/strong\u003e\u003c/p\u003e\n\n![Build Status](https://img.shields.io/github/actions/workflow/status/yhisaki/plotly.cpp/ci.yml?branch=main)\n[![Documentation](https://img.shields.io/badge/docs-Doxygen-blue.svg)](https://yhisaki.github.io/plotly.cpp/)\n[![codecov](https://codecov.io/gh/yhisaki/plotly.cpp/graph/badge.svg?token=NsLJgwCpau)](https://codecov.io/gh/yhisaki/plotly.cpp)\n![Version](https://img.shields.io/github/v/tag/yhisaki/plotly.cpp?label=version)\n![License](https://img.shields.io/github/license/yhisaki/plotly.cpp)\n![C++ Standard](https://img.shields.io/badge/C%2B%2B-17%2B-blue.svg)\n![Platform](https://img.shields.io/badge/platform-Linux-lightgrey)\n\n  \u003cp align=\"center\"\u003e\n    \u003cimg src=\"/docs/images/gallery.png\" alt=\"Plotly.cpp Demo\" width=\"600\"\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n**Plotly.cpp** brings the power of [Plotly.js](https://plotly.com/javascript/) to C++. Most Plotly.js functions have direct C++ equivalents, making it a familiar plotting library for C++ developers.\n\n\u003e [!WARNING]\n\u003e **This library is currently under active development**\n\u003e\n\u003e We welcome feedback, bug reports, and contributions to help stabilize the library!\n\n## 📋 Table of Contents\n\n- [✨ Key Features](#-key-features)\n- [🔄 Plotly.js Compatibility](#-plotlyjs-compatibility)\n- [🚀 Installation \u0026 Quick Start](#-installation--quick-start)\n  - [Prerequisites](#prerequisites)\n  - [Installation](#installation)\n- [📊 Simple Examples](#-simple-examples)\n  - [Hello World Example](#hello-world-example)\n  - [Real-Time Streaming Data](#real-time-streaming-data)\n  - [3D Surface Plots](#3d-surface-plots)\n  - [Multi-Trace Styling \u0026 Legends](#multi-trace-styling--legends)\n  - [2×2 Subplots](#22-subplots)\n  - [Interactive Event Handling](#interactive-event-handling)\n- [🎨 Advanced Gallery](#-advanced-gallery)\n- [🏗️ Architecture Overview](#️-architecture-overview)\n  - [Key Components](#key-components)\n  - [Communication Flow](#communication-flow)\n  - [Example Message Flow](#example-message-flow)\n- [📋 Complete API Reference](#-complete-api-reference)\n  - [Core Classes](#core-classes)\n  - [Essential Methods (Direct Plotly.js Equivalents)](#essential-methods-direct-plotlyjs-equivalents)\n  - [Advanced Methods (Direct Plotly.js Equivalents)](#advanced-methods-direct-plotlyjs-equivalents)\n  - [Export \u0026 Utility Methods](#export--utility-methods)\n- [🏗️ Development \u0026 Contributing](#️-development--contributing)\n  - [Building from Source](#building-from-source)\n  - [Code Quality Tools](#code-quality-tools)\n- [📜 License](#-license)\n- [🌟 Star History](#-star-history)\n\n## ✨ Key Features\n\n- 🔗 **Plotly.js API Mapping** - Translation of most Plotly.js methods\n\n  \u003cimg src=\"/docs/images/plotly_cpp_api.svg\" alt=\"Plotly.js API Mapping\" width=\"400\"\u003e\n\n- 🎨 **Advanced Visualizations** - Rich variety of plot types. See [gallery](gallery/README.md) for more examples.\n\n  \u003cimg src=\"/docs/images/financial_candlestick.png\" alt=\"Advanced Visualizations\" width=\"400\"\u003e\n\n- ⚡ **Real-Time Updates** - Stream data with smooth animations and live updates\n\n  \u003cimg src=\"/docs/images/double_pendulum.gif\" alt=\"Real-Time Updates\" width=\"400\"\u003e\n\n- 🔄 **Bidirectional Events** - Handle user interactions from C++\n\n  \u003cimg src=\"/docs/images/event_handling.gif\" alt=\"Bidirectional Events\" width=\"400\"\u003e\n\n## 🔄 Plotly.js Compatibility\n\nIf you know Plotly.js, you already know Plotly.cpp. The library provides C++ equivalents for Plotly.js functions:\n\n| Plotly.js (JavaScript)                                                                                   | Plotly.cpp (C++)                  | Purpose              |\n| -------------------------------------------------------------------------------------------------------- | --------------------------------- | -------------------- |\n| [Plotly.newPlot()](https://plotly.com/javascript/plotlyjs-function-reference/#plotlynewplot)             | `plotly::Figure::newPlot()`       | Create new plot      |\n| [Plotly.update()](https://plotly.com/javascript/plotlyjs-function-reference/#plotlyupdate)               | `plotly::Figure::update()`        | Update data \u0026 layout |\n| [Plotly.restyle()](https://plotly.com/javascript/plotlyjs-function-reference/#plotlyrestyle)             | `plotly::Figure::restyle()`       | Update styling       |\n| [Plotly.relayout()](https://plotly.com/javascript/plotlyjs-function-reference/#plotlyrelayout)           | `plotly::Figure::relayout()`      | Update layout only   |\n| [Plotly.extendTraces()](https://plotly.com/javascript/plotlyjs-function-reference/#plotlyextendtraces)   | `plotly::Figure::extendTraces()`  | Stream data          |\n| [Plotly.addTraces()](https://plotly.com/javascript/plotlyjs-function-reference/#plotlyaddtraces)         | `plotly::Figure::addTraces()`     | Add new traces       |\n| [Plotly.deleteTraces()](https://plotly.com/javascript/plotlyjs-function-reference/#plotlydeletetraces)   | `plotly::Figure::deleteTraces()`  | Remove traces        |\n| [Plotly.downloadImage()](https://plotly.com/javascript/plotlyjs-function-reference/#plotlydownloadimage) | `plotly::Figure::downloadImage()` | Save image file      |\n\nSimilar data structures, same parameters, and similar behavior with C++ syntax.\n\n## 🚀 Installation \u0026 Quick Start\n\n### Prerequisites\n\n- **Ubuntu Linux** (tested platform)\n- **Chrome/Chromium** browser\n- **C++17 or higher**\n\n### Installation\n\n#### Install from deb package (Recommended)\n\n```bash\nwget https://github.com/yhisaki/plotly.cpp/releases/download/v0.1.0/libplotly-cpp-0.1.0-Linux.deb\nsudo apt install ./libplotly-cpp-0.1.0-Linux.deb\n```\n\n#### Install from FetchContent\n\nAdd to your CMake project using FetchContent:\n\n```cmake\ninclude(FetchContent)\n\nFetchContent_Declare(\n    plotly-cpp\n    GIT_REPOSITORY https://github.com/yhisaki/plotly.cpp.git\n    GIT_TAG v0.1.0\n)\n\nFetchContent_MakeAvailable(plotly-cpp)\n```\n\n#### Usage\n\nAfter installation, add the following to your `CMakeLists.txt`:\n\n```cmake\nfind_package(plotly-cpp REQUIRED)\n\ntarget_link_libraries(your_target plotly-cpp::plotly-cpp)\n```\n\n#### Dependencies\n\nPlotly.cpp requires the following dependencies:\n\n- [**nlohmann/json**](https://github.com/nlohmann/json) - JSON serialization/deserialization. You can install it by `sudo apt install nlohmann-json3-dev`.\n\n## 📊 Simple Examples\n\nYou can find more details in [documentation](https://yhisaki.github.io/plotly.cpp/examples.html).\n\n### Hello World Example\n\n```cpp\n#include \"plotly/plotly.hpp\"\n#include \u003cvector\u003e\n\nint main() {\n    plotly::Figure fig;\n    fig.openBrowser();  // Open browser explicitly\n\n    std::vector\u003cdouble\u003e x = {1, 2, 3, 4, 5};\n    std::vector\u003cdouble\u003e y = {1, 4, 2, 8, 5};\n\n    plotly::Object trace = {\n        {\"x\", x}, {\"y\", y}, {\"type\", \"scatter\"},\n        {\"mode\", \"lines+markers\"}\n    };\n\n    fig.newPlot(plotly::Array{trace});\n    fig.waitClose();\n    return 0;\n}\n```\n\n📁 **[Complete example](gallery/gallery_hello_world.cpp)**\n\n**JavaScript equivalent:**\n\n```javascript\nPlotly.newPlot(\"myDiv\", [\n  {\n    x: [1, 2, 3, 4, 5],\n    y: [1, 4, 2, 8, 5],\n    type: \"scatter\",\n    mode: \"lines+markers\",\n  },\n]);\n```\n\n![Hello World Example](/docs/images/hello-world.png)\n\n### Real-Time Streaming Data\n\n```cpp\n#include \"plotly/plotly.hpp\"\n#include \u003cchrono\u003e\n#include \u003ccmath\u003e\n#include \u003cthread\u003e\n\nint main() {\n    plotly::Figure fig;\n    fig.openBrowser();\n\n    // Create initial empty trace\n    plotly::Object trace = {\n        {\"x\", std::vector\u003cdouble\u003e{}}, {\"y\", std::vector\u003cdouble\u003e{}},\n        {\"type\", \"scatter\"}, {\"mode\", \"lines\"}\n    };\n    std::vector\u003cplotly::Object\u003e data = {trace};\n    fig.newPlot(data);\n\n    // Stream sine wave data in real-time\n    for (double t = 0; t \u003c 100 \u0026\u0026 fig.isOpen(); t += 0.1) {\n        fig.extendTraces({{\"x\", {std::vector\u003cdouble\u003e{t}}},\n                          {\"y\", {std::vector\u003cdouble\u003e{std::sin(t)}}}}, {0}, 100);\n        std::this_thread::sleep_for(std::chrono::milliseconds(50));\n    }\n    return 0;\n}\n```\n\n📁 **[Complete example](gallery/gallery_streaming_data.cpp)**\n\n**JavaScript equivalent:**\n\n```javascript\nfunction streamData() {\n  const newX = [currentTime];\n  const newY = [Math.sin(currentTime)];\n\n  Plotly.extendTraces(\"myDiv\", { x: [newX], y: [newY] }, [0], 100);\n}\n```\n\n![streaming_data](/docs/images/streaming_data.gif)\n\n### 3D Surface Plots\n\n```cpp\n#include \"plotly/plotly.hpp\"\n#include \u003ccmath\u003e\n\nint main() {\n    plotly::Figure fig;\n    fig.openBrowser();\n\n    // Generate 3D surface data\n    int size = 50;\n    std::vector\u003cstd::vector\u003cdouble\u003e\u003e z(size, std::vector\u003cdouble\u003e(size));\n    for (int i = 0; i \u003c size; i++) {\n        for (int j = 0; j \u003c size; j++) {\n            double x = (i - size / 2.0) * 0.2;\n            double y = (j - size / 2.0) * 0.2;\n            z[i][j] = std::sin(std::sqrt(x * x + y * y));\n        }\n    }\n\n    plotly::Object trace = {\n        {\"z\", z}, {\"type\", \"surface\"}, {\"colorscale\", \"Viridis\"}\n    };\n\n    fig.newPlot(plotly::Array{trace});\n    fig.waitClose();\n    return 0;\n}\n```\n\n📁 **[Complete example](gallery/gallery_3d_surface.cpp)**\n\n**JavaScript equivalent:**\n\n```javascript\nconst z = []; // 2D array of surface data\n// Generate 3D surface data...\n\nPlotly.newPlot(\"myDiv\", [\n  {\n    z: z,\n    type: \"surface\",\n    colorscale: \"Viridis\",\n  },\n]);\n```\n\n![3d_surface](/docs/images/3d_surface.gif)\n\n### Multi-Trace Styling \u0026 Legends\n\n```cpp\n#include \"plotly/plotly.hpp\"\n#include \u003ccmath\u003e\n#include \u003cnumbers\u003e\n#include \u003cvector\u003e\n\nint main() {\n    plotly::Figure fig;\n    fig.openBrowser();\n\n    int n = 5000;\n    std::vector\u003cdouble\u003e x(n), y(n), z(n), w(n, 2.0);\n\n    for (int i = 0; i \u003c n; ++i) {\n        x[i] = i * i;\n        y[i] = std::sin(2 * std::numbers::pi * i / 360.0);\n        z[i] = std::log(i + 1); // +1 to avoid log(0)\n    }\n\n    // Multiple traces with different styles\n    plotly::Object trace1 = {{\"x\", x}, {\"y\", y}, {\"type\", \"scatter\"},\n                            {\"mode\", \"lines\"}, {\"name\", \"sin(2πi/360)\"}};\n    plotly::Object trace2 = {{\"x\", x}, {\"y\", w}, {\"type\", \"scatter\"}, {\"mode\", \"lines\"},\n                            {\"line\", {{\"color\", \"red\"}, {\"dash\", \"dash\"}}},\n                            {\"name\", \"constant line (y=2)\"}};\n    plotly::Object trace3 = {{\"x\", x}, {\"y\", z}, {\"type\", \"scatter\"},\n                            {\"mode\", \"lines\"}, {\"name\", \"log(x)\"}};\n\n    plotly::Object layout = {\n        {\"title\", {{\"text\", \"Sample figure\"}}},\n        {\"xaxis\", {{\"range\", {0, 1000000}}}}, // xlim equivalent\n        {\"showlegend\", true},\n        {\"width\", 1200}, {\"height\", 780}\n    };\n\n    fig.newPlot({trace1, trace2, trace3}, layout);\n    fig.waitClose();\n    return 0;\n}\n```\n\n📁 **[Complete example](gallery/gallery_multi_trace_styling.cpp)**\n\n**JavaScript equivalent:**\n\n```javascript\nconst trace1 = {\n  x: x,\n  y: y,\n  type: \"scatter\",\n  mode: \"lines\",\n  name: \"sin(2πi/360)\",\n};\nconst trace2 = {\n  x: x,\n  y: w,\n  type: \"scatter\",\n  mode: \"lines\",\n  line: { color: \"red\", dash: \"dash\" },\n  name: \"constant line (y=2)\",\n};\nconst trace3 = {\n  x: x,\n  y: z,\n  type: \"scatter\",\n  mode: \"lines\",\n  name: \"log(x)\",\n};\n\nconst layout = {\n  title: { text: \"Sample figure\" },\n  xaxis: { range: [0, 1000000] },\n  showlegend: true,\n  width: 1200,\n  height: 780,\n};\n\nPlotly.newPlot(\"myDiv\", [trace1, trace2, trace3], layout);\nPlotly.downloadImage(\"myDiv\", { format: \"png\", filename: \"basic\" });\n```\n\n![multi-trace-styling](/docs/images/multi_trace_styling.png)\n\n### 2×2 Subplots\n\n```cpp\n#include \"plotly/plotly.hpp\"\n#include \u003cvector\u003e\n#include \u003ccmath\u003e\n\nint main() {\n    plotly::Figure fig;\n\n    std::vector\u003cplotly::Object\u003e traces;\n\n    // Create traces for each subplot...\n\n    plotly::Object layout = {\n        {\"title\", {{\"text\", \"2x2 Subplot Grid\"}}},\n        {\"grid\", {{\"rows\", 2}, {\"columns\", 2}, {\"pattern\", \"independent\"}}},\n        {\"showlegend\", false}};\n\n    fig.newPlot(traces, layout);\n    fig.waitClose();\n    return 0;\n}\n```\n\n📁 **[Complete example](gallery/gallery_2x2_subplots.cpp)**\n\n![2x2 Subplots](/docs/images/2x2_subplots.png)\n\n### Interactive Event Handling\n\n```cpp\n#include \"plotly/plotly.hpp\"\n#include \u003cvector\u003e\n\nint main() {\n    plotly::Figure fig;\n    fig.openBrowser();\n\n    // Create plot\n    std::vector\u003cdouble\u003e x = {1, 2, 3, 4, 5};\n    std::vector\u003cdouble\u003e y = {1, 4, 2, 8, 5};\n    plotly::Object trace = {{\"x\", x}, {\"y\", y}, {\"type\", \"scatter\"}, {\"mode\", \"markers\"}};\n    fig.newPlot(plotly::Array{trace});\n\n    // Register event handlers\n    fig.on(\"plotly_click\", [](const plotly::Object \u0026event) {\n      // Do something when a point is clicked\n    });\n\n    fig.on(\"plotly_hover\", [](const plotly::Object \u0026event) {\n        // Do something when a point is hovered\n    });\n\n    fig.waitClose();\n    return 0;\n}\n```\n\n📁 **[Complete example](gallery/gallery_event_handling.cpp)**\n\n![event_handling](/docs/images/event_handling.gif)\n\n## 🎨 Advanced Gallery\n\nMore complex examples and use cases are available in the [gallery](gallery).\n\n[![gallery](/docs/images/gallery.png)](gallery)\n\n## 🏗️ Architecture Overview\n\nYou can find more details in [Architecture Overview](https://yhisaki.github.io/plotly.cpp/architecture.html).\n\n### Key Components\n\n**1. C++ Backend (`plotly::Figure`)**\n\n- **WebSocket Server**: Real-time bidirectional communication using libwebsockets\n- **HTTP Server**: Serves the web frontend assets (HTML, CSS, JavaScript)\n- **JSON-RPC Protocol**: Structured message passing for plot commands and events\n- **Browser Integration**: Automatically launches Chrome/Chromium with appropriate configuration\n\n**2. Web Frontend (JavaScript)**\n\n- **Plotly.js Runtime**: The actual plotting engine that renders visualizations\n- **WebSocket Client**: Connects to C++ backend for command/event exchange\n- **JSON-RPC Handler**: Maps incoming C++ calls to Plotly.js API functions\n- **Event Bridge**: Forwards user interactions (clicks, hovers) back to C++\n\n### Communication Flow\n\n1. **Startup**: The `plotly::Figure` constructor starts an HTTP server (with an automatically selected port) and a WebSocket server. The browser is opened separately via the `openBrowser()` method.\n2. **Sending Plot Commands**: C++ function calls such as `fig.newPlot(data)` are converted into JSON-RPC messages and return `bool` indicating success/failure.\n3. **Rendering**: The frontend receives these messages and invokes the corresponding Plotly.js functions.\n4. **Event Handling**: If C++ callbacks are registered with `fig.on()`, the frontend sends event data back to C++ via WebSocket whenever such events occur.\n\n### Example Message Flow\n\n```cpp\nfig.newPlot({{\"x\", {1,2,3}}, {\"y\", {4,5,6}}, {\"type\", \"scatter\"}});\n```\n\nBecomes JSON-RPC message:\n\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"method\": \"Plotly.newPlot\",\n  \"params\": {\n    \"data\": [{ \"x\": [1, 2, 3], \"y\": [4, 5, 6], \"type\": \"scatter\" }]\n  },\n  \"id\": 0\n}\n```\n\nFrontend sends back the following JSON-RPC message when the plot is completed:\n\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"result\": { \"success\": true },\n  \"id\": 0\n}\n```\n\n## 📋 Complete API Reference\n\n### Core Classes\n\n| Class            | Description                                                 |\n| ---------------- | ----------------------------------------------------------- |\n| `plotly::Figure` | Main plotting interface (replaces HTML div element)         |\n| `plotly::Object` | JSON-compatible data container (same as JavaScript objects) |\n\n### Essential Methods (Direct Plotly.js Equivalents)\n\n| C++ Method                                 | JavaScript Equivalent                                                                                                                   | Purpose              |\n| ------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------- | -------------------- |\n| `newPlot(data, layout, config)`            | [`Plotly.newPlot(div, data, layout, config)`](https://plotly.com/javascript/plotlyjs-function-reference/#plotlynewplot)                 | Create new plot      |\n| `update(traceUpdate, layoutUpdate)`        | [`Plotly.update(div, traceUpdate, layoutUpdate)`](https://plotly.com/javascript/plotlyjs-function-reference/#plotlyupdate)              | Update data \u0026 layout |\n| `relayout(layout)`                         | [`Plotly.relayout(div, layout)`](https://plotly.com/javascript/plotlyjs-function-reference/#plotlyrelayout)                             | Update layout only   |\n| `restyle(aobj, traces)`                    | [`Plotly.restyle(div, aobj, traces)`](https://plotly.com/javascript/plotlyjs-function-reference/#plotlyrestyle)                         | Update trace styling |\n| `extendTraces(update, indices, maxPoints)` | [`Plotly.extendTraces(div, update, indices, maxPoints)`](https://plotly.com/javascript/plotlyjs-function-reference/#plotlyextendtraces) | Stream new data      |\n| `react(data, layout, config)`              | [`Plotly.react(div, data, layout, config)`](https://plotly.com/javascript/plotlyjs-function-reference/#plotlyreact)                     | Efficient update     |\n\n### Advanced Methods (Direct Plotly.js Equivalents)\n\n| C++ Method                               | JavaScript Equivalent                                                                                                               | Purpose              |\n| ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | -------------------- |\n| `addTraces(traces, indices)`             | [`Plotly.addTraces(div, traces, indices)`](https://plotly.com/javascript/plotlyjs-function-reference/#plotlyaddtraces)              | Add new traces       |\n| `deleteTraces(indices)`                  | [`Plotly.deleteTraces(div, indices)`](https://plotly.com/javascript/plotlyjs-function-reference/#plotlydeletetraces)                | Remove traces        |\n| `moveTraces(currentIndices, newIndices)` | [`Plotly.moveTraces(div, currentIndices, newIndices)`](https://plotly.com/javascript/plotlyjs-function-reference/#plotlymovetraces) | Reorder traces       |\n| `prependTraces(update, indices)`         | [`Plotly.prependTraces(div, update, indices)`](https://plotly.com/javascript/plotlyjs-function-reference/#plotlyprependtraces)      | Prepend data         |\n| `addFrames(frames)`                      | [`Plotly.addFrames(div, frames)`](https://plotly.com/javascript/plotlyjs-function-reference/#plotlyaddframes)                       | Add animation frames |\n| `animate(frames, opts)`                  | [`Plotly.animate(div, frames, opts)`](https://plotly.com/javascript/plotlyjs-function-reference/#plotlyanimate)                     | Trigger animations   |\n\n### Export \u0026 Utility Methods\n\n| C++ Method                         | JavaScript Equivalent                                                                                               | Purpose                     |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------- | --------------------------- |\n| `downloadImage(opts)`              | [`Plotly.downloadImage(div, opts)`](https://plotly.com/javascript/plotlyjs-function-reference/#plotlydownloadimage) | Save image file             |\n| `setDownloadDirectory(path, port)` | N/A (C++-specific)                                                                                                  | Set browser download folder |\n| `isOpen()`                         | N/A (C++-specific)                                                                                                  | Check connection status     |\n| `waitClose()`                      | N/A (C++-specific)                                                                                                  | Block until closed          |\n\n**Documentation Reference:** Use [Plotly.js documentation](https://plotly.com/javascript/) directly - most examples translate directly to C++.\n\n## 🏗️ Development \u0026 Contributing\n\n### Building from Source\n\n```bash\ngit clone https://github.com/yhisaki/plotly.cpp.git\ncd plotly.cpp\n\n# Build everything\nmake release # or make debug for debug build\n\n# Build with Thread Sanitizer\nmake tsan\n\n# Build with Address Sanitizer\nmake asan\n```\n\n### Code Quality Tools\n\n```bash\n# Set up development environment\npip install pre-commit\npre-commit install\n\n\n# Format code (with clang-format)\nmake format\n\n# Run clang-tidy\nmake tidy\n\n# Build and create coverage report\nmake coverage\n```\n\n## 📜 License\n\nThis project is licensed under the [MIT License](LICENSE) - see the LICENSE file for details.\n\n## 🌟 Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=yhisaki/plotly.cpp\u0026type=Date)](https://star-history.com/#yhisaki/plotly.cpp\u0026Date)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyhisaki%2Fplotly.cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyhisaki%2Fplotly.cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyhisaki%2Fplotly.cpp/lists"}