Questions tagged [ipycanvas]
7 questions
2
votes
0 answers
How to display ipycanvas canvas object into a separated tab or panel in Jupyter-lab
I am trying to use ipycanvas in Jupyter notebook (https://ipycanvas.readthedocs.io/en/latest/). It is working fine. However, Jupyter notebook scroll down when you add new "section". If the canvas object is displayed above, and when you want to…

palazzo train
- 3,229
- 1
- 19
- 40
1
vote
1 answer
ipycanvas can not show image with javascript error
I am running the basic ipycanvas sample code
from ipywidgets import Image
sprite1 = Image.from_file("lena.jpeg")
canvas = Canvas(width=300, height=300)
canvas.fill_style = "#a9cafc"
canvas.fill_rect(0, 0, 300, 300)
canvas.draw_image(sprite1, 50,…

bhomass
- 3,414
- 8
- 45
- 75
1
vote
1 answer
How to display Canvas with ipycanvas on Jupyterhub?
The following code works fine on my local machine/environment:
from ipycanvas import Canvas
canvas = Canvas(width=300, height=300)
display(canvas)
But using jupyterhub installed on VM on GCP it does no longer display the canvas.
What is missing ?

moctarjallo
- 1,479
- 1
- 16
- 33
1
vote
1 answer
ipycanvas displaying final stroke_lines thoughout animation
So I was playing with animating some Bezier curves - just part of learning how to use ipycanvas (0,10,2) -- The animation I produced is really hurting my head. What I expected to see was a set of straight lines between 4 Bezier control points…

nickdmax
- 539
- 2
- 4
- 11
1
vote
1 answer
Type is not JSON serializable error in ipycanvas
I am trying to use ipycanvas in Jupyter notebook with SageMath 9.3 (I also tried 9.3.rc2) for macOS 11.4, and Python 3. When I was using SageMath 9.2 and Python 3 ipycanvas was working fine, but when I updated sage to SageMath 9.3 I started having…

Gaston Burrull
- 169
- 7
0
votes
1 answer
How to print string and show canvas in the same notebook cell
While working in a jupyter notebook with ipycanvas I faced the issue of printing stuff and show a canvas at the same time.
Either printing is working or the display of the canvas, but both won't.
Is there a way to do both in the same cell?
from…

Newl
- 310
- 2
- 12
-1
votes
1 answer
how to draw a pixel in ipycanvas
I cannot figure out how to draw a pixel in ipycanvas. I am drawing rectangles instead of pixels and this makes drawing very slow.
Drawing a rectangle using:
canvas.fill_rect
Code to display image in ipycanvas :
import pandas as pd
import numpy as…

Udesh
- 2,415
- 2
- 22
- 32