My goal is to create a subplot with a contour map and x and y marginal barplots. The example I am working from is the last example here: https://plot.ly/r/contour-plots/
Of course, the example is a contour plot so that may cause part of the issue. However, I find that none of my plots are showing up at all when I run this code:
subplot(
plot_ly(x = xz[,2], y = xz[,1], type = ‘bar’),
plotly_empty(type = “scatter”, mode = “markers”),
plot_ly(x = X1, y = Y1, z = intensity, type = “heatmapgl”),
plot_ly(x = yz[,1], y = yz[,2], type = ‘bar’, orientation = ‘h’),
nrows = 2, heights = c(0.2, 0.8), widths = c(0.8, 0.2), margin = 0,
shareX = TRUE, shareY = TRUE, titleX = FALSE, titleY = FALSE
)
All of the plots when run on their own show up nicely. However, when all set within the subplot function, only bar plots would show up. I tried updating plotly and the result was that now the bar plots don’t even show up. Is it possible to do this at all with a heatmap?