Skip to content

The plotly figure is empty in the code block "Basic data" #1902

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ziphei
Copy link

@ziphei ziphei commented Apr 1, 2025

I just explore the file examples/tutorial/detailed_workflow.ipynb.
when I execute the code block below,I found that the result figure is empty.
import plotly.graph_objects as go

fig = go.Figure(
data=[
go.Candlestick(
x=df.index.get_level_values("datetime"),
open=df["$open"],
high=df["$high"],
low=df["$low"],
close=df["$close"],
)
]
)
fig.show()

Description

Insert two lines of code, and these two lines of code are in italics.
import plotly.graph_objects as go
import plotly.io as pio
pio.renderers.default = "notebook"

fig = go.Figure(
data=[
go.Candlestick(
x=df.index.get_level_values("datetime"),
open=df["$open"],
high=df["$high"],
low=df["$low"],
close=df["$close"],
)
]
)
fig.show()

Motivation and Context

the result figure of the code is empty and user can see nothing

How Has This Been Tested?

  • Pass the test by running: pytest qlib/tests/test_all_pipeline.py under upper directory of qlib.
  • If you are adding a new feature, test on your own test scripts.

Screenshots of Test Results (if appropriate):

  1. Pipeline test:
  2. Your own tests:
    image

Types of changes

  • Fix bugs
  • Add new feature
  • Update documentation

ziphei added 2 commits April 1, 2025 11:37
the result figure is empty
fix issue: the plotly figure is empty
@github-actions github-actions bot added the waiting for triage Cannot auto-triage, wait for triage. label Apr 1, 2025
@ziphei
Copy link
Author

ziphei commented Apr 8, 2025

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for triage Cannot auto-triage, wait for triage.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant