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
0
votes
2 answers

R plot_ly plots missing values due to wrong rows extraction from a list

I have the following data : > data Type value 1 aromatics.aromatics 0.974489796 2 aromatics.charged 0.005102041 3 aromatics.polar 0.005102041 4 aromatics.unpolar 0.015306122 5 charged.aromatics 0.008620690 6 …
Micawber
  • 707
  • 1
  • 5
  • 19
0
votes
1 answer

Linked Click for maps in Plotly R

Data : https://www.kaggle.com/wood2174/mapkickstarter So i have a map im making with shiny and plotly and id like to click on a state and then pull up that state to get info on the counties in that state. Well iv seen other linked plot examples in…
Clinton Woods
  • 249
  • 1
  • 2
  • 11
0
votes
1 answer

Unwanted popup storm triggered by old observeEvents created inside a function

How to stop observers created within a function from existing more than once when data changes? UPDATE: - Further simplified the app on github for easier testing. - been trying to use destroy ---- I have made an app that requires several (10ish)…
Mark
  • 2,789
  • 1
  • 26
  • 66
0
votes
0 answers

How to add annotation to Plotly heat map using R language

library(complexHeatmap) library(circlize) p <- plot_ly(droplevels(data_Frame, x = ~factor(X),y=~Y,z=~Z, key=~Z,type = "heatmap",source = "heatplot")%>% …
SNEHA
  • 77
  • 1
  • 11
0
votes
1 answer

How fill a plot to a given y0 value

I'm using Plotly in R and I want to create a plot like this: But when trying with fill = "tozeroy" the plot looks like this: Ignoring the value of y0 So, I want to fill the area from the lines to y0 value, instead to absolute zero. A code…
Alnair
  • 938
  • 8
  • 10
0
votes
1 answer

R plotly overlay heatmaps

I have two matrices, A and B, I want to make two heatmaps with plotly, and overlay them library(plotly) A = matrix(c(1:8, rep(0, 8)), ncol = 4) B = matrix(c(rep(0, 8), 1:8), ncol = 4) PA <- plot_ly(z = A, type = "heatmap", colors =…
Wang
  • 1,314
  • 14
  • 21
0
votes
1 answer

R scatter plot - different colors for text and markers

I have problem like that - I want to make scatter plot where markers have different colors. But the problem is names of markers - it have another colors than dots. Is there any way to make it consistent? Here is code…
Jeddite
  • 87
  • 1
  • 8
0
votes
0 answers

How to add pattern to pie chart R plotly

I have created a pie chart using plotly, the pie has 14 parts, I want to distinguish between them, it needs to be in grayscale I have been using grDevices for grey colors but it is hard to see the differences. I thought about adding a…
PSmy
  • 11
  • 1
  • 3
0
votes
2 answers

Color histrogram by standard deviation plotly R

I am generating a histogram representing normally distributed data. I would like to color the histogram based on the standard deviation from the mean(i.e. within one SD = blue, 2 = green, 3=orange). Here is a snippet of the code I'm using: x <-…
Isaac
  • 215
  • 2
  • 15
0
votes
1 answer

plot_ly function in R

I look at Plotly guideline but I could not find a way to rename x and y labels. Any advice? library(quantregGrowth) data(growthData) m6<-gcrq(y~ps(x, lambda=seq(0,100,l=20)), tau=c(0.025,0.975), n.boot=10, data=growthData) library(ggplot2) …
shoo
  • 87
  • 1
  • 11
0
votes
1 answer

Multiple axes labelling in R Plotly

I am trying to make a dual axis plot using plotly in R. However, I am unable to name the first y-axis using the following code whicI i found here: https://plot.ly/r/multiple-axes/ library(plotly) ay <- list( tickfont = list(color =…
Sate Ahmad
  • 27
  • 8
0
votes
1 answer

Plotly hoverinfo wont work in R

So I copied the example off of plotly for R on making a bubble map. I can currently make a bubble map but I am unable to make hoverinfo work. I have seen on other posts that hoverinfo has given other people problems but none of the fixes I have…
Clinton Woods
  • 249
  • 1
  • 2
  • 11
0
votes
1 answer

Unable to plot a timeseries graph using plotly with a dataframe in R. Continuously getting the error "$ operator is invalid for atomic vectors."

I have a dataframe df with following values in its two columns: Year Temperature 1750 8.719364 1751 7.976143 1752 5.779833 1753 8.388083 1754 8.469333 1755 8.355583 1756 8.849583 1757 9.022000 1758 6.743583 1759 7.985083 1760 7.185167 and so on for…
LearneR
  • 2,351
  • 3
  • 26
  • 50
0
votes
1 answer

How can I make a linear relation between two vectors?

I am trying to make a correlation plot with plot_ly As an example I do library(plotly) d <- diamonds[sample(nrow(diamonds), 1000), ] p <- plot_ly( d, x = ~carat, y = ~price, # Hover text: text = ~paste("Price: ", price, '$
Cut:', cut), …
nik
  • 2,500
  • 5
  • 21
  • 48
0
votes
0 answers

mixed up color in plotly mesh

I've been trying to plot a 3d mesh with colors in plotly and but the face colors keep being assigned incorrectly. library(plotly) library(Rvcg) # example mesh plyFile <-…
telfer
  • 15
  • 3