Description Usage Arguments Value Author(s) See Also Examples
View source: R/plotly_modify_hover.R
Function corrects text in a hover of a plotly
object.
1 2 3 4 5 6 7 | plotly_modify_hover(
obj,
new_text = list(),
hovermode = NULL,
hoverinfo = NULL,
hoverformat = NULL
)
|
obj |
a plotly object (created with function |
new_text |
Either |
hovermode |
(enumerated: |
hoverinfo |
[NOT IMPLEMENTED YET. Option has no effect.] (flaglist string)
Any combination of "x", "y", "z", "text", "name" joined with a "+" OR "all" or "none". |
hoverformat |
(string) [NOT IMPLEMENTED YET. Option has no effect.]
Sets the hover text formatting rule for data values on this axis, using
the python/d3 number formatting language. See
https://github.com/mbostock/d3/wiki/Formatting#numbers or
https://docs.python.org/release/3.1.3/library/string.html#formatspec
for more info. |
An updated plotly object (class plotly
).
Vilmantas Gegzna
Online reference
https://plot.ly/r/reference/#scatterternary-hoverinfo;
Functions layout(), plot_ly(),
Other spPlot functions for plotly:
label_expr2text()
,
plotly_annotation_rm()
,
plotly_modify_legend()
,
plotly_tidy()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(spPlot)
library(spHelper)
library(hyperSpec)
library(plotly)
# Create `plotly` object:
obj <- qplot_spStat(chondro,"clusters",mean) %>%
label_expr2text() %>%
ggplotly()
# Then compare hover in this plot:
plotly_modify_hover(obj)
# With the hover in the original plot:
print(obj)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.