about summary refs log tree commit diff
path: root/pkgs/development/python-modules/kaleido/tests.py
blob: 0cbcaaae60bed6025abf2aaf3ac30c46215d85ab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
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")