Description Usage Arguments Examples
Plot a Spectra
object with respect to depth
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | spc.plot.depth.plotly(
sp,
column,
plot.max = 10,
showlegend = FALSE,
hoverinfo = "name",
title = sp@LongName
)
## S4 method for signature 'Spectra'
spc.plot.depth.plotly(
sp,
column,
plot.max = 10,
showlegend = FALSE,
hoverinfo = "name",
title = sp@LongName
)
|
sp |
A |
column |
Number or name , default value is 10 if a number or name has not been entered |
plot.max |
numeric value for a maximum number of data in plot |
showlegend |
logical, to display legend or not, default is FALSE |
hoverinfo |
a chracter, info about |
title |
a chracter string, title for plot |
1 2 3 4 5 6 7 8 9 10 11 12 | sp = spc.example_spectra()
BL = spc.makeSpcList(sp,"CAST")
p1<-spc.plot.depth.plotly(BL[[5]])
#p1<-layout(p1,title=paste("CAST =", BL[[5]]$CAST[1]))
p2<-spc.plot.depth.plotly(BL[[4]])
#p2<-plotly::layout(p2,title=paste("CAST =", BL[[4]]$CAST[1]))
p <- plotly::subplot(p1, p2, margin = 0.05, shareY=TRUE,shareX=TRUE,titleX=TRUE,titleY=TRUE)
p <- plotly::layout(p, showlegend = TRUE,
annotations = list(
list(x = 0.2 , y = 1.05, text = BL[[5]]$CAST[1], showarrow = FALSE, xref='paper', yref='paper'),
list(x = 0.8 , y = 1.05, text = BL[[4]]$CAST[1], showarrow = FALSE, xref='paper', yref='paper')))
p
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.