Horizontal grid lines in plotly R

luc*_*cho 3 r plotly

The standard R plotly scatter/line graph comes with both vertical and horizontal grid lines. I cannot find the command to select only vertical or horizontal lines. I want the latter. So far I have found the following commands in the offiial guide:

showgrid = FALSE/TRUE
gridcolor = ...
gridwidth = ...
Run Code Online (Sandbox Code Playgroud)

Any idea which is the command to select subset of grid lines?

Van*_*pez 5

编辑:showline参数确实是为轴。showgrid应该适用于网格线,在中的每个轴坐标内都称为layout()

plot_ly(x = c(1,2), y = c(1,2)) %>%
  layout(xaxis = list(showgrid = F),
         yaxis = list(gridcolor = "black"))
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明