Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/67.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R绘图:如何更改方框图上的悬停标签?_R_Plotly_Boxplot - Fatal编程技术网

R绘图:如何更改方框图上的悬停标签?

R绘图:如何更改方框图上的悬停标签?,r,plotly,boxplot,R,Plotly,Boxplot,我使用plotly创建了一个长方体图。为了使它更具可读性并处理大量异常值,我得到了变量的对数刻度。然而,我希望有一种方法可以编辑显示原始数据的中位数、四分位数等标签 这就是我到目前为止所做的: Time = plot_ly(df, x = ~log(duration_mins), color = ~shape, type ="box", colors = "RdYlBu") Time %>% layout(title = "Durati

我使用plotly创建了一个长方体图。为了使它更具可读性并处理大量异常值,我得到了变量的对数刻度。然而,我希望有一种方法可以编辑显示原始数据的中位数、四分位数等标签

这就是我到目前为止所做的:

Time = plot_ly(df, x = ~log(duration_mins), color = ~shape, type ="box", colors = "RdYlBu")
Time %>%
  layout(title = "Duration of shape (log Scale)",
  xaxis = list(title = "=Minutes"),
  yaxis = list(title = "Shape"),
  showlegend = FALSE)
我在plotly函数中添加了:
text=~duration\u mins,hoverinfo=“text”
。然而,这只改变了数据点的值,中位数和IQ范围不再显示任何信息