Questions tagged [r-plotly]

plotly is an R package to create interactive web-based visualizations via 'plotly.js'.

plotly is a plotting package for R used to create interactive data visualizations. For examples and documentation, visit the plotly website here.

Repository

Stable Version on Cran

1205 questions
5
votes
1 answer

How do you add a customized color index for mesh3d plots in Plot_ly?

I can easily make a mesh3d plot in R: library(plotly) x <- runif(50, 0, 110) y <- runif(50, 0, 1) z <- runif(50, 1, 2) plot_ly(x = ~x, y = ~y, z = ~z, type = 'mesh3d') I want to color the surface based on the values of the z variable: high values…
gm1991
  • 163
  • 1
  • 7
5
votes
1 answer

How do I force identical colors for all plots in a subplot in plotly?

In the following example, I have four box plots within a plotly subplot. Each of the four box plots in this example has 3 variables: stocks, bonds and cash. In each of the box plots, I’d like stocks to show in the same color (e.g., blue), bonds to…
rmacey
  • 599
  • 3
  • 22
5
votes
1 answer

3D surface with a 2D projection using R

I need to plot a 3D surface with 2D projections like the one below using R. It features a 3D density plot, something easy to do in R using plotly, for example. The 2D surfaces on the other hand I've had no luck so far in my search for how to draw…
5
votes
0 answers

R Plotly 3D: axis labels with TeX

I'd like to use TeX to label the axes of a 3D-surface plot. I somehow managed - with help of MathJax - to use TeX for the title. Not the axes though. Attached you find an example of what I tried to do. x0 <-…
Strickland
  • 590
  • 4
  • 14
5
votes
3 answers

Change output width of plotly chart size in R Markdown PDF output

On a R markdown file, does someone know why out.width,out.height,figure.width and figure.height parameters doesn't change plotly charts size when producing a pdf file? ( I precise that such parameters works perfectly using plot function) Please…
JeanBertin
  • 633
  • 1
  • 7
  • 23
5
votes
2 answers

Disable the legend double click event

How do I disable the "Double click on legend to isolate one trace" interaction in plotly for R? I want a double click to just have the effect of two clicks. Here is an example on how to do this with Javascript: Plotly.newPlot('graph', [{ y: [1,…
PascalIv
  • 595
  • 7
  • 21
5
votes
2 answers

Plotly (r): Unable to apply correct colors to 3D scatter and show legend at the same time

Answer has been given: https://stackoverflow.com/a/51503530/10071318 I'm trying to create a 3D scatter with plotly including two regression planes. I'll include a proper reproducible example at the end. Main plot command: p <- plot_ly(x=~x1.seq,…
5
votes
4 answers

How to turn off tooltip showing all of my data in Plotly?

I am making a shiny dashboard application. One of the Tabs in the dashboard is for my Plotly plot. I am able to get the plot to show up just fine, but whenever I leave my mouse's cursor over the plot for more than a second, a massive tooltip shows…
skippy_winks
  • 778
  • 3
  • 14
  • 31
5
votes
3 answers

Using Proxy Interface in Plotly/Shiny to dynamically change data

I want to update the data present in a plot (displayed in plotlyOutput in a Shiny app) using Proxy Interface. Here is a minimal App.R code : library(shiny) library(plotly) ui <- fluidPage( actionButton("update", "Test"), …
Julien Vernay
  • 295
  • 3
  • 13
5
votes
1 answer

How to make plotly work with shiny and gridExtra?

I'm using R shiny would like to put several ggplotly plots side by side with the help of gridExtra. One plot (without gridExtra) works just fine: library(shiny) library(plotly) u <- fluidPage(plotlyOutput(outputId = "myplots")) s <-…
d_w
  • 85
  • 6
5
votes
2 answers

Plotting Ellipse3d in R Plotly with surface ellipse

Similar to the question here but this didn't give me excatly what I needed and I couldn't figure it out: Plot ellipse3d in R plotly?. I want to recreate rgl's ellipse3d and surface ellipsoid in plotly. I know there there was an anwer which allowed…
adrienne
  • 103
  • 1
  • 9
5
votes
1 answer

Extract all click event plots from Shiny, Plotly - R

In the following shiny app, the plotly package is used to create an interactive correlation heat map. When individual tiles are clicked, the corresponding scatter plot appears. One can then download the individual scatters by clicking download plot…
J.Con
  • 4,101
  • 4
  • 36
  • 64
5
votes
3 answers

Removing traces by name using plotlyProxy (or accessing output schema in reactive context)

I am attempting to use the plotlyProxy() functionality (Documented here) to allow users of a shiny application to add and remove traces with minimal latency. Adding traces proves to be relatively simple, but I'm having difficulty figuring out how to…
Matt Summersgill
  • 4,054
  • 18
  • 47
5
votes
1 answer

Plotly, add border around points created with add_markers

I'm trying to create a plotly scatter plot with border around points. The ideal thing is: plot_ly(data = iris, x = ~Sepal.Length, y = ~Petal.Length, marker = list(size = 10, color = 'rgba(255, 182, 193, .9)', …
potockan
  • 3,998
  • 3
  • 25
  • 37
5
votes
1 answer

Arrange path order of line plot in >4.x Plotly

I need to plot a path that does not strictly go from left to right but cross' itself on the y-axis, however since I upgraded to plotly 4.7 I cannot not do this. It was no problem in fx. 3.6 Does anyone know, how to tell plotly how to order the…
mtcarsalot
  • 301
  • 2
  • 8