- Are there ways to incorporate interactive
plotlygraphics, or similar, into stats.stackexchange answers and questions?
- If not, are there alternatives?
- What questions/answers here show some good examples?
No; it is not possible. The only way this could be possible is via iframe HTML tag, but stackexchange allows only a limited number of HTML tags and does not enable users to use any embedded content besides images.
I also do not think that we would need plotly for anything on CrossValidated. If you need an interactive plot for your answer, then it is probably not self-explanatory and you should improve the answer, rather than the graphics. Notice that most of the answers on CV do not use graphics, or use very limited and simple graphics. Interactive (i.e. more than 2D) graphics are needed to visualize pretty complicated data structures, and CV is not the place to discuss such data (it would need a detailed analysis, rather than a short answer).
CV is a place to ask and receive answers on general problems, possibly illustrated with simple data examples. Moreover, you can always post code that users can run on their own machines to interactively check something about your answer.
As @Tim says, the answer is no. But I'm not so against interactive graphics. I can see their utility for some questions, e.g., illustrating things like paradoxes caused by endogeneity. Anytime there are issues pertaining to data in more than two dimensions, there is the possibility that interactive graphics could be helpful.
Let me suggest a possible alternative: It is possible to create and post animations (gifs) to the site as images. (You can view some examples in @amoeba's answer to Making sense of principal component analysis, eigenvectors & eigenvalues thread.) Thus, what I would suggest is that you produce a simple animation of interacting with a graphic in a particular way to illustrate some point. Be sure to walk through that you're doing and what it shows in the text. You won't have the ability to allow the user to interact freely on their own and truly explore the ideas for themself, but you should be able to cover most of what you need to show; you could always post a couple of different ones, if necessary.