Skip to content
forked from plotly/Kaleido

Fast static image export for web-based visualization libraries with zero dependencies

License

Notifications You must be signed in to change notification settings

geopozo/Kaleido

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kaleido

Kaleido is a cross-platform library for generating static images for Plotly's visualization library. After installing it, you can use fig.write_image("filename.png") to save a plot to a file.

How It Works

The original version of kaleido included a custom build of the Chrome web browser, which made it very large (hundreds of megabytes) and proved very difficult to maintain. In contrast, this version depends on choreographer, a lightweight library that enables remote control of browsers from Python. When you ask kaleido to create an image, it uses choreographer to run a headless instance of Chrome to render and save your figure. Please see choreographer's documentation for details.

The new version of kaleido is a work on progress; we would be grateful for help testing it and improving it. If you find a bug, please report it in our GitHub repository, and please include a minimal reproducible example if you can.

Installation

You can install kaleido from PyPI using pip:

$ pip install kaleido

Use

Versions 4.9 and above of the Plotly Python library will automatically use kaleido for static image export when kaleido is installed. For example:

import plotly.express as px
fig = px.scatter(px.data.iris(), x="sepal_length", y="sepal_width", color="species")
fig.write_image("figure.png", engine="kaleido")

See the Plotly static image export documentation for more information.

About

Fast static image export for web-based visualization libraries with zero dependencies

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 44.4%
  • Python 32.2%
  • JavaScript 22.3%
  • Other 1.1%