Hello,
This is my function :
plot.common.offset.refrac <- function(data_table, time_exp, common_offset){
# Déclaration des variables
T = time_exp
dt = T/nrow(data_table)
# Abscisse temporelle
t = seq(dt, T, by = dt)
# On initialize le plot
no_trace <- ncol(data_table)
P_REFRAC <- plot_ly(data = data_table) %>%
layout(title = paste0("Profils à offsets communs : ", common_offset),
yaxis = list(autorange="reversed") )
for(k in 1:no_trace){
dfk <- data.frame(Temps = t[1:(nrow(data_table)/2)] , Offset = data_table[1:(nrow(data_table)/2),k])
P_REFRAC <- plotly::add_trace(P_REFRAC, y = ~Temps, x = ~Offset, data = dfk,
type = "scatter", mode = "lines",
fill = 'tozeroy', fillcolor = '#000000',
name = paste0("Voie ", k),
line = list(color = 'rgb(0, 0, 0)',width = "1px"))
}
return(P_REFRAC)
}
And this is my result, but the right part don't exist...
Because without "filter"
Someone know why plotly create a symetric result ?