Skip to content

Commit

Permalink
notebook rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Polyakov committed May 14, 2024
1 parent 0f4b7ed commit 56b7492
Show file tree
Hide file tree
Showing 2 changed files with 124 additions and 127 deletions.
239 changes: 114 additions & 125 deletions notebooks/Finding interesting segments.ipynb

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions wise_pizza/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,21 @@ def plot_split_segments(
image_bytes = to_image(fig, format="png", scale=2)

if sf_size.relevant_cluster_names:
image_bytes2 = to_image(fig2, format="png", scale=2)
display(
Image(
image_bytes,
height=height + len(size_data.index) * 30,
width=width + len(size_data.index) * 30,
)
)
fig2.show()
display(
Image(
image_bytes2,
height=height + len(size_data.index) * 30,
width=width + len(size_data.index) * 30,
)
)

else:
# Display the static image in the Jupyter notebook
Expand Down Expand Up @@ -410,8 +417,9 @@ def plot_waterfall(
# Convert the figure to a static image
image_bytes = to_image(fig, format="png", scale=2)
if sf.relevant_cluster_names:
image_bytes2 = to_image(fig2, format="png", scale=2)
display(Image(image_bytes, height=height, width=width))
fig2.show()
display(Image(image_bytes2, height=height, width=width))
else:
# Display the static image in the Jupyter notebook
display(Image(image_bytes, width=width, height=height))
Expand Down

0 comments on commit 56b7492

Please sign in to comment.