I have a data frame like this:
dput(df)
structure(list(date = structure(c(16476, 16477, 16524, 16541,
16595, 16658, 16769, 16804, 16819, 16819, 16828, 16833, 16875
), class = "Date"), y = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L)), .Names = c("date", "y"), row.names = c(NA,
-13L), class = c("tbl_df", "tbl", "data.frame"))
I use plotly R to plot a scatter plot like this:
plot_ly(df, x = date, y = y, mode = 'markers')
The above statement works perfectly fine.
Now, I just want to increase the size of the points in the scatter plot. Trying this messes up the whole plot including the x axis date scale:
plot_ly(df, x = date, y = y, mode = 'markers', size = 10)
Any idea what is going on? My version is:
packageVersion('plotly')
[1] ‘3.5.5’
?plot_ly
says:size A variable name or numeric vector to encode the size of markers.
– Gopala