I'm new to latex and rmarkdown. I am trying to center a plotly chart and I have already tried fig.align = "center" and nothing happens, if to this command I add fig.show = 'hold', the plot is centered but the \begin{center} code is added after the plot image. I tried to add latex code directly before the chunk (\ begin {center}) and \ end {center} after, but it still appears in the pdf output visible latex code. Please I don't no what happen with this.
This is my code
a <- list(
autotick = FALSE,
ticks = "outside",
tick0 = 0,
dtick = 1,
ticklen = 0,
tickwidth = 1,
tickcolor = toRGB("blue")
)
avlbty<-plot_ly(df_merged, x = ~daytime, y = ~Availability, color = ~Series,type = 'scatter', mode = 'lines', fill = 'tozeroy', width =700, height = 350)
avlbty<-avlbty %>%
layout(title = "Availability by Service",yaxis = a,
xaxis=list(title='Date'),font=f, margin = list(l=50, r=50, b=0, t=30, pad=0))
avlbty
df_merged
or other items. Please produce a MWE. – oliversm May 6 '20 at 10:38