sketch.createCanvas(width,150);// width is an Observable variable here
}
sketch.draw=function(){
sketch.background(200);
sketch.circle(sketch.width/2,sketch.height/2,80);
}
})
p5(s=>{
s.setup=function(){
s.createCanvas(width,150);// width is an Observable variable here
}
s.draw=function(){
s.background(200);
s.fill(190,0,190);// set purple fill color
s.circle(s.width/2,s.height/2,80);
}
})
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.