How to label facets with Plotly.js?

#1

I have a series of 9 related datasets from different biological samples and I’ve generated a series of subplots for each, plotted in a simple grid pattern (3 x-axes and 3 y-axes). What’s the best way to label these subplots with their sample names?

I’m used to working with ggplot in R, where this is handled automatically by facet_grid or facet_wrap. It looks like I can use annotations to add arbitrary text to the plot, but that seems a bit fiddly. Is there a better way to handle facet labels than that? And if not, is there a way to specify that the labels should be at the top-center of each subplot?

Sincerely,
Brett

#2

plotly.js doesn’t have the concept of facets yet. So to label them, you’ll have to resort to annotations at the moment unfortunately.