Questions tagged [ggplotly]

ggplotly is a function which converts a ggplot object into an interactive plotly object. It enables the usage of functions like zoom, hover, playing with the axis, appearing/disappearing group of points.

For more information and examples, please visit the website.

799 questions
0
votes
1 answer

Counting the number of bars in a grouped bar chart in R and plotly

When I run this script below, It gives me two grouped bar charts. I simply want a vector with the count of number of bars in each group. Attaching the snapshot for reference, clearly, the vector will have two count values. Please…
Ashmin Kaul
  • 860
  • 2
  • 12
  • 37
0
votes
0 answers

Sankey diagram using Plotly

I wish to create a simple sankey chart using this piece of data and specifically plotly package such that, activity ABC points to Resouce "R5", "BVN" to "R1" and "IOP" to "R6". I followed the plotly post https://plot.ly/r/sankey-diagram/, but I just…
Ashmin Kaul
  • 860
  • 2
  • 12
  • 37
0
votes
1 answer

Horizontal bar plot using ggplot2 and plotly

The given plot generates a barplot using ggplot2 and plotly. I want to create a similar horizontal barplot using ggplotly(p). Tried using the attribute coord_flip() in geom_bar() but no help. Please help me and thanks. library(plotly) dat <-…
Ashmin Kaul
  • 860
  • 2
  • 12
  • 37
0
votes
0 answers

Process Mining using ggplot2 and plotly in R

the script below creates a process map diagram using standard built in patients data. I wish to customize the plot furthur using ggplot2 and plotly such that I can create a dynamic process diagram which is interactive. I am not getting, how to put…
Ashmin Kaul
  • 860
  • 2
  • 12
  • 37
0
votes
1 answer

running ggplotly function resuts to Error in FUN(X[[i]], ...) : object 'x' not found

Today I was trying to run code which previously worked fine. But I got following error: > p1 <- ggplot(dframe, aes(x, y, text=sprintf("letter: %s
LETTER: %s
", a, b))) + geom_line() + geom_point() > ggplotly(p1) We recommend that you use the…
Wakan Tanka
  • 7,542
  • 16
  • 69
  • 122
0
votes
1 answer

Plot multiple y-axes in Plotly

I have the following code for my layout: var layout = { title:"Energy usage of green electrical appliances", plot_bgcolor:"#000", paper_bgcolor:"#000", showlegend:false, margin:"{l: 40, b: 40, r: 80, t:…
Harryw
  • 65
  • 6
0
votes
1 answer

Shiny renderPlotly with two conditions

I am developing app in Shiny. I want to render plot using submit button. I also want to print labels if user check the inputcheckbox. I am able to render plot via button. But it doesnt work when the checkbox checked. Here is the code: …
alan pter
  • 41
  • 3
  • 11
-1
votes
1 answer

How to round numbers on x-axis in ggplotly/plotly?

How can I round up years on axis, I applied as.integer() function, but it does not work. Usually, I use scale_x_continuous(breaks=2015,2022,2)) in case of ggplot, but now I need something same for ggplotly/plotly
user18948933
-1
votes
1 answer

How to make a stacking bar using ggplot?

I have got this dataset. I am trying to do a stacking bar graph with proportions using ggplot for this data: I am not really sure how to manipulate it into tables first! I know, I just started learning R, two weeks ago and I'm kind of stuck. I…
AA AA
  • 1
-1
votes
1 answer

Separate groups in a ggplot heatmap by adding a black column between them

I have a dataframe: gene_symbol <- c("sads", "sdsds", "sdasdad", "dfds", "sdsdd") panel <- c("big", "big", "big", "gr", "sm") variable <- c("x", "x", "y", "z", "y") value <- c("normal", "over", "low", "normal", "low") colors <- c("red", "green",…
firmo23
  • 7,490
  • 2
  • 38
  • 114
-1
votes
1 answer

Displaying the table details from sankey chart in R shiny

The script below works on the patients data from bupaR package,and creates a sankey plot listing the relation between a resource from the "employee" column with the activity he is involved in from the "handling" column in the patients data. Besides…
Ashmin Kaul
  • 860
  • 2
  • 12
  • 37
-1
votes
1 answer

Customizing the sankey chart to cater large datasets

kindly run the script below, I have created a Sankey chart in R and plotly using data from "patients" dataset of the bupaR library. Please see the snapshot for reference. The issue I am facing is that, this custom plot has been built by declaring…
Ashmin Kaul
  • 860
  • 2
  • 12
  • 37
-1
votes
1 answer

Diplaying activity details in a data table in R shiny

When I run this R shiny script below, I get two plots with a chart for activity path derived from the patients dataset of the bupaR library called trace explorer on the left and a data table to display the activity/trace details. The chart on the…
Ashmin Kaul
  • 860
  • 2
  • 12
  • 37
-1
votes
2 answers

Making a stacked bar plot based on ranges in R and plotly

I want to create a stacked bar chart in R and plotly using iris dataset. In the x-axis, I want to set limits like iris_limits below in the code and the y-axis should contain all the Sepal.Length values which fit into these ranges. I want to pass the…
Ashmin Kaul
  • 860
  • 2
  • 12
  • 37
-2
votes
1 answer

how can I share my interactive map made in R?

I did an interactive using ggplot2 and ggplotly. How can I share it with another person? Thanks,
PDS
  • 1
1 2 3
53
54