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 in Data Analytics by karthi
21 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 by anonymous
• 31,840 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,550 points
60 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,550 points
22 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 darklord
• 6,170 points
42 views
0 votes
1 answer

R Programming: Running multiple sub-strings

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

answered Feb 6 in Data Analytics by Sophie may
• 9,870 points
28 views
0 votes
1 answer

R chart using plotly

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

answered Nov 4 in Data Analytics by Cherukuri
• 31,840 points
25 views
0 votes
1 answer

How to get interactive plots in R?

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

answered Nov 2 in Data Analytics by anonymous
• 31,840 points
23 views
0 votes
1 answer

Waterfall chart using plotly in R

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

answered Nov 2 in Data Analytics by Cherukuri
• 31,840 points
65 views
0 votes
1 answer

Sunburst charts using plotly

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

answered Nov 3 in Data Analytics by Cherukuri
• 31,840 points
139 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 in Data Analytics by Cherukuri
• 31,840 points
19 views