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
ggplot is called to produce a violin plot. The data set contains very little data so that the distribution plot is not able to be created. ggplot returns (what I believe to be) a valid ggplot object.
when ggplotly() is called with this object, it throws an error. I would have expected ggplotly() to return without an error as ggplot() did.
Then gg2list() calls layers2traces() at line 216: traces <- layers2traces(data, prestats_data, layout, plot)
layers2traces() is in a loop at line 67. The 2nd list element of data[[i]] is a dataframe with no rows or columns.
What happened is the violin plot did not have enough data for ggplot to create any of the density plots
so the violin plot structure is empty. When I replace the call to ggplotly(gg) with print(gg), violin plots are not produced, only the points from the geom_jitter() call.
ggplotly() is unfortunately, crashing here with the message:
Browse[6]> c
Error in order(data[["y"]], decreasing = TRUE) :
argument 1 is not a vector
>
Browse[6]> str(data)
List of 2
$ :Classes ‘GeomPoint’ and 'data.frame': 6 obs. of 13 variables:
..$ x : num [1:6] 0.733 0.897 2.355 1.677 3.377 ...
..$ y : num [1:6] 0.816 0.728 0.579 0.881 1 ...
..$ PANEL : Factor w/ 1 level "1": 1 1 1 1 1 1
..$ group : int [1:6] 1 1 2 2 3 3
.. ..- attr(*, "n")= int 3
..$ x_plotlyDomain: chr [1:6] "A" "A" "B" "B" ...
..$ y_plotlyDomain: num [1:6] 0.816 0.728 0.579 0.881 1 ...
..$ shape : num [1:6] 19 19 19 19 19 19
..$ colour : chr [1:6] "black" "black" "black" "black" ...
..$ size : num [1:6] 1.5 1.5 1.5 1.5 1.5 1.5
..$ fill : logi [1:6] NA NA NA NA NA NA
..$ alpha : logi [1:6] NA NA NA NA NA NA
..$ stroke : num [1:6] 0.5 0.5 0.5 0.5 0.5 0.5
$ :Classes ‘GeomViolin’ and 'data.frame': 0 obs. of 0 variables
Browse[6]>
ggplot is called to produce a violin plot. The data set contains very little data so that the distribution plot is not able to be created. ggplot returns (what I believe to be) a valid ggplot object.
when ggplotly() is called with this object, it throws an error. I would have expected ggplotly() to return without an error as ggplot() did.
ggplotly.ggplot()
callsgg2list()
Then
gg2list()
callslayers2traces()
at line 216:traces <- layers2traces(data, prestats_data, layout, plot)
layers2traces()
is in a loop at line 67. The 2nd list element ofdata[[i]]
is a dataframe with no rows or columns.What happened is the violin plot did not have enough data for ggplot to create any of the density plots
so the violin plot structure is empty. When I replace the call to
ggplotly(gg)
withprint(gg)
, violin plots are not produced, only the points from thegeom_jitter()
call.ggplotly()
is unfortunately, crashing here with the message:The text was updated successfully, but these errors were encountered: