Black Lives Matter. Please consider donating to Black Girls Code today.

Combine multiple chart types into one graph

I’m wanting to know if I could combine a stacked bar chart, a group bar chart, and a line chart into one graph in R. Is this possible?

Hey @sgatta

Are you referring to subplots? If so, there is a few different doc pages here https://plot.ly/r/#multiple-axes-subplots-and-insets

1 Like

@bcd I’ve seen these sheets, but none of them give me the subplot I described above. Am i able to create my own subplots in R?

These are just some examples of the types of things that you can do. You can create most types of subplots and use these examples as a syntax guide. Here is some more info on building subplots https://cpsievert.github.io/plotly_book/merging-plotly-objects.html

1 Like