library(nphys)
library(plotly)
#library(quantmod)

Select and make averaged traces from the imported data.

This markdown describes how we can use the traces component of the field data set to observe and analyze the inter

data(field)

Basic plotly interactive

xA = list(
  title = "Time (ms)"
)
yA = list(
  range = c(-1.2,0.1),
  title = "mV"
)



# updateMenus <- list(
#     active = -1,
#     type = "buttons",
#     buttons = list(
#       list(
#         label = "Cond",
#         method = "update",
#         args = list(list(visible = c(FALSE, TRUE)),
#                     list(title = "Cond"))
#         ),
#       list(
#         label = "Decay",
#         method = "update",
#         args = list(list(visible = c(TRUE, FALSE)),
#                     list(title = "Decay"))
#         )
#       )
#     )



plot <- plotly::plot_ly(data = data.frame(field$traces), x = ~ms, y = ~Bl_Avg, type = "scatter", mode = "markers")
  plot = plotly::add_trace(p = plot,x = ~ms, y = ~Decay_Avg)
  plot = plotly::add_trace(p = plot,x = ~ms, y = ~Cond_Avg)

plot


NRSC/nphys documentation built on Nov. 13, 2024, 2:12 a.m.