Add multiple sub plots within same panel.

0 votes
How to add multiple sub plots within same panel using plotly? Show multiple charts in one grid.
Aug 23, 2019 in Data Analytics by karthi
31 views

1 answer to this question.

0 votes

Hi, Karthi

The subplot() function in plotly provides a flexible interface for merging plotly objects into a single object.

1. Create plotly images and store them in variables.

2. provide plotly objects to subplot like below.

Ex: 

p1 <- plot_ly(economics, x = ~date, y = ~unemploy) %>% add_lines(name = ~"unemploy")
p2 <- plot_ly(economics, x = ~date, y = ~uempmed) %>% add_lines(name = ~"uempmed")
p <- subplot(p1, p2)

The example is explained in detail here, https://plot.ly/r/subplots/

answered Aug 26, 2019 by anonymous
• 32,420 points

Related Questions In Data Analytics

0 votes
1 answer

Plotting multiple graphs on the same page in R

If you want to plot 4 graphs ...READ MORE

answered Mar 27, 2018 in Data Analytics by Bharani
• 4,560 points
78 views
0 votes
1 answer

Loading multiple packages at the same time

You can use the p_load() function from ...READ MORE

answered Jun 4, 2018 in Data Analytics by Bharani
• 4,560 points
27 views
0 votes
1 answer

Multiple plots onto a single page in R

Plotting multiple plots onto a single page ...READ MORE

answered Jul 17, 2018 in Data Analytics by Sahiti
• 6,290 points
51 views
0 votes
1 answer

R Programming: Running multiple sub-strings

Instead of using the substr() try with ...READ MORE

answered Feb 6, 2019 in Data Analytics by Sophie may
• 9,900 points
41 views
0 votes
1 answer

R chart using plotly

Plot_ly example library(plotly) today <- Sys.Date() tm <- ...READ MORE

answered Nov 4, 2019 in Data Analytics by Cherukuri
• 32,420 points
32 views
0 votes
1 answer

How to get interactive plots in R?

The best packages for creating interactive visualizations ...READ MORE

answered Nov 2, 2019 in Data Analytics by anonymous
• 32,420 points
29 views
0 votes
1 answer

Waterfall chart using plotly in R

A simple waterfall chart using plotly - df ...READ MORE

answered Nov 2, 2019 in Data Analytics by Cherukuri
• 32,420 points
140 views
0 votes
1 answer

Sunburst charts using plotly

See below example library(plotly) p <- plot_ly( labels ...READ MORE

answered Nov 3, 2019 in Data Analytics by Cherukuri
• 32,420 points
272 views
0 votes
1 answer
0 votes
1 answer

Add custom lines/sentences within ggplot

Use geom_text along with position and text ...READ MORE

answered Nov 2, 2019 in Data Analytics by Cherukuri
• 32,420 points
26 views