Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
0 answers
46 views

Create a function that converts a dataframe into a format suitable for a treemap structure

I want to create a treemap for a dataframe using the Plotly package. For this purpose, I need to create a function that converts the dataframe into a format suitable for a treemap structure. On the ...
Masoud's user avatar
  • 565
0 votes
1 answer
26 views

How to change state border color in R Plotly choropleth map?

I have replicated the choropleth map for discrete colors in R using the method suggested in this link: How to create a chloropleth map in R Plotly based on a Categorical variable? However, as you will ...
Lagrange's user avatar
1 vote
0 answers
25 views

Two dropdown menus to select Y and Y2 axes independently

I am trying to generate a plot which has independent dropdown menus for both Y and Y2 axes. I am able to implement a dropdown for either the Y1 or Y2 axis when the other is static. I have also ...
mchen's user avatar
  • 71
2 votes
1 answer
45 views

How to display a custom color for NA values in an R Plotly choropleth map?

I would like to change the fill color of NA values in a choropleth r plotly interactive map from white (or transparent?) to light gray. This is for an R Shiny application, so I would like to retain ...
rdev's user avatar
  • 23
0 votes
0 answers
13 views

Highlight areas of interactive time series plotly plot where y is greater than defined threshold and annotate them

I would like to highlight sections of plotly plot that have values higher than a certain threshold and annotate them. As I am manually screening each highlighted area on the plots is there a way I can ...
LZ24AP's user avatar
  • 55
1 vote
1 answer
23 views

Vertical Line Plot in Plotly Does Not Respect Order

I am struggling to convince plotly to respect the order of points in my vertical line chart. Data library(dplyr) d <- tribble( ~value, ~n, ~freq, "1", 391, 0.0370, &...
thothal's user avatar
  • 19.1k
1 vote
2 answers
61 views

Display all levels in legend of ggplotly object

How do I display all legends in R ggplotly? As of now it only displays the legends for matching data. Here is what I have done so far: library(ggplot2) library(plotly) schoolname <- c("Xavier&...
Suraj Tiwari's user avatar
1 vote
1 answer
43 views

How do I format R Plotly axis to show ticks in gigabytes instead of billions?

Edited: I am working on a bar chart that represents database size at the beginning of each month. Please see the simplification of my code below: library(plotly) fig <- plot_ly(type = 'bar', ...
Annabanana's user avatar
1 vote
1 answer
41 views

Why is plotly_legenddoubleclick becoming out of sync?

I attempt to capture plotly_legenddoubleclick events to trigger a styling event in a second plot. When the user double clicks a legend group, the group is highlighted in the corresponding scatterplot ...
Barry D's user avatar
  • 90
0 votes
0 answers
34 views

Plot not showing on Shiny, but works correctly on RStudio. How can I solve it?

I'm making a Shiny page that have a plot and a table on the main panel that are created based on the options selected by the user on sidebarPanel. In the ui I'm doing some reactive calculations based ...
Felipe Gonçalves's user avatar
0 votes
0 answers
36 views

Embedding a GGPlotly into Gatsby page

THE INTRO: I am trying to embed ggplotly graphs into a Gatsby webpage I am learning to create. After arguing back and forth with ChatGPT for a couple hours, I'm seeking out your knowledge. Here is at ...
Logan W.'s user avatar
0 votes
2 answers
26 views

Interactive barchart in R using plotly

I would like to recreate my ggplot barchart with plotly to make it interactive. However, I'm not able to get the y axis to be my desired variable and instead get the following error: Error in eval(...
Sasha M's user avatar
1 vote
2 answers
82 views

How do I optimize the position of Y-axis titles and data representation?

How can I in the plotly plot: a) position the axis titles horizontally above their respective axes? b) reduce the space between y=0 and the X-axis? c) draw the green data points for Power before the ...
Gurkenhals's user avatar
1 vote
1 answer
121 views

Create dropdown list in R using plotly?

I want to create a dropdown list with the years 2019 to 2024 for this plot: I'm using R Markdown and plotly to create the interactive plot. I managed to make this plot for 2021, but I can't seem to ...
Lana Meijinhos's user avatar
0 votes
1 answer
36 views

Add points over bars in R

When creating a bar plot in plotly, it automatically offsets bars next to one another, but if I add points to the same plot, the points are not offset. How do I offset the points to match the bars? ...
filups21's user avatar
  • 1,813

15 30 50 per page
1
2 3 4 5
372