Public
Edited
Sep 28, 2022
4 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
{
// We load an image file (sample file or uploaded image)
// Sample image adapted from https://blog.datawrapper.de/weeklychart-logscale2/
let image_load = img_file != null ?
await img_file.url(img_file)
: await FileAttachment("logarithmic_vs_linear_scale.png").url();

svg.attr("id", "container");
svg.selectAll(".bkg_image").remove();
svg.append("svg:image")
.attr("xlink:href", image_load)
.attr("x", 0)
.attr("y", 0)
.attr("width", image_width)
.attr("class","bkg_image")
.lower(); // Image placed under (background)
return image_load;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

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.
Learn more