depot/third_party/nixpkgs/pkgs/development/python-modules/kaleido/tests.py
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

11 lines
296 B
Python

import plotly.express as px
import os
import os.path
out = os.environ["out"]
if not os.path.exists(out):
os.makedirs(out)
outfile = os.path.join(out, "figure.png")
fig = px.scatter(px.data.iris(), x="sepal_length", y="sepal_width", color="species")
fig.write_image(outfile, engine="kaleido")