You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a plotly's feature that is not working correctly. Im not sure if it is a bug or just a non-implemented feature really so I'll let you decide. Im an R user so I will post a example in R code here. I don't know another language for which plotly works like Java so sorry about that.
On plotly, trace visibility accepts 3 different values. TRUE, FALSE and "legendonly". It is also possible to edit trace visibility using updatemenus, like buttons and dropdownmenus. The problem is that when using updatemenus to update trace visibility, it is possible to mix TRUE and FALSE, TRUE and "legendonly" but mixing FALSE and "legendonly" does not work correctly. When i do mix the last two options, FALSE is recognized as TRUE. I didn't see any example on plotly website using this specific mix so I'm not sure it was suposed to work.
Here goes a link to a plot in which that problem happens and the R code to generate it:
The issue is true and false are supposed to be boolean values, but somehow by the time they make it here you have the string'FALSE' which is invalid so we revert to the default value (true). Not sure if this is an issue with the R API or something in your code - you do have the correct true in the 'All T' button which makes me think perhaps it's a problem with the R API and mixed-type arrays? Anyway I would open an issue over at https://github.com/ropensci/plotly
hey there,
There is a plotly's feature that is not working correctly. Im not sure if it is a bug or just a non-implemented feature really so I'll let you decide. Im an R user so I will post a example in R code here. I don't know another language for which plotly works like Java so sorry about that.
On plotly, trace visibility accepts 3 different values. TRUE, FALSE and "legendonly". It is also possible to edit trace visibility using updatemenus, like buttons and dropdownmenus. The problem is that when using updatemenus to update trace visibility, it is possible to mix TRUE and FALSE, TRUE and "legendonly" but mixing FALSE and "legendonly" does not work correctly. When i do mix the last two options, FALSE is recognized as TRUE. I didn't see any example on plotly website using this specific mix so I'm not sure it was suposed to work.
Here goes a link to a plot in which that problem happens and the R code to generate it:
https://plot.ly/~EpimedSolutions/47/#/
library(plotly)
x0 <- rnorm(400, mean=2, sd=0.4)
y0 <- rnorm(400, mean=2, sd=0.4)
x1 <- rnorm(400, mean=3, sd=0.6)
y1 <- rnorm(400, mean=6, sd=0.4)
x2 <- rnorm(400, mean=4, sd=0.2)
y2 <- rnorm(400, mean=4, sd=0.4)
shapes components
cluster0 = list(
type = 'circle',
xref ='x', yref='y',
x0=min(x0), y0=min(y0),
x1=max(x0), y1=max(y0),
opacity=0.25,
line = list(color="#835AF1"),
fillcolor="#835AF1")
cluster1 = list(
type = 'circle',
xref ='x', yref='y',
x0=min(x1), y0=min(y1),
x1=max(x1), y1=max(y1),
opacity=0.25,
line = list(color="#7FA6EE"),
fillcolor="#7FA6EE")
cluster2 = list(
type = 'circle',
xref ='x', yref='y',
x0=min(x2), y0=min(y2),
x1=max(x2), y1=max(y2),
opacity=0.25,
line = list(color="#B8F7D4"),
fillcolor="#B8F7D4")
updatemenus component
updatemenus <- list(
list(
active = -1,
type = 'buttons',
buttons = list(
)
)
p <- plot_ly(type = 'scatter', mode='markers') %>%
add_trace(x=x0, y=y0, mode='markers', marker=list(color='#835AF1')) %>%
add_trace(x=x1, y=y1, mode='markers', marker=list(color='#7FA6EE')) %>%
add_trace(x=x2, y=y2, mode='markers', marker=list(color='#B8F7D4')) %>%
layout(title = "Highlight Clusters",
updatemenus = updatemenus)
p
Thanks for your attention.
The text was updated successfully, but these errors were encountered: