Note: This particular example uses an online copy of the plotly JavaScript library from a CDN location, so it will not work without an internet connection. Here is an example of exporting a Plotly figure using the low-level Kaleido API: The kaleido Python package provides a low-level Python API that is designed to be used by high-level plotting libraries like Plotly. See the plotly static image export documentation for more information. Then, open figure.png in the current working directory. write_image ( "figure.png", engine = "kaleido" ) iris (), x = "sepal_length", y = "sepal_width", color = "species" ) fig. For example: import plotly.express as px fig = px. Versions 4.9 and above of the Plotly Python library will automatically use kaleido for static image export when kaleido is installed. Use Kaleido to export plotly.py figures as static images Releases of the core kaleido C++ executable are attached as assets to GitHub releases at. ![]() $ conda install -c conda-forge python-kaleido The kaleido package can be installed from PyPI using pip. ![]() As such, the focus is on providing a programmatic-friendly, rather than user-friendly, API. The primary focus of Kaleido (at least initially) is to serve as a dependency of web-based visualization libraries like plotly.py. The project's initial focus is on the export of plotly.js images from Python for use by plotly.py, but it is designed to be relatively straight-forward to extend to other web-based visualization libraries, and other programming languages. png, svg, pdf, etc.) for web-based visualization libraries, with a particular focus on eliminating external dependencies. Kaleido is a cross-platform library for generating static images (e.g.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |