Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fig.write_image not working #216

Open
luckychris opened this issue Nov 2, 2024 · 1 comment
Open

fig.write_image not working #216

luckychris opened this issue Nov 2, 2024 · 1 comment
Labels

Comments

@luckychris
Copy link

i tried this:

import plotly.graph_objects as go
import numpy as np
np.random.seed(1)

N = 100
x = np.random.rand(N)
y = np.random.rand(N)
colors = np.random.rand(N)
sz = np.random.rand(N) * 30

fig = go.Figure()
fig.add_trace(go.Scatter(
    x=x,
    y=y,
    mode="markers",
    marker=go.scatter.Marker(
        size=sz,
        color=colors,
        opacity=0.6,
        colorscale="Viridis"
    )
))

# from pathlib import Path

# f = Path("Users/chris/Downloads").cwd().joinpath("images")
# if not f.is_dir(): f.mkdir()
# f = f.joinpath("fig1.png")

# print("f is",f)

fig.write_image("fig.png")

and got an error.

Can u help?

@ayjayt
Copy link
Collaborator

ayjayt commented Nov 4, 2024

Does it get an error? what's the error?

There is a new release imminent, it is in pre-release state on pip/pypi.

@ayjayt ayjayt added the active label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants