title: Set major tick labels to be displayed as scientific notation in a Plotly plot in R
body: <p>I'm trying to get <code>plotly</code> to put values in scientific notation regardless of their size, i.e. 100 should be 1E02 in the ticks, but it keeps showing numbers below 10.000 as normal annotation. </p>
  
  <p>Setting the format is done through <code>exponentformat = "E"</code>"but it only affects larger numbers.</p>
  
  <p>Here is an example code of how I write it: </p>
  
  <pre><code>f2 &lt;- list(family = "Old Standard TT, serif", size = 14, color = "black")
  
  ax &lt;- list(showticklabels = TRUE, tickfont = f2,  showgrid=F,  zeroline=T,  showline=T,  nticks = 4,  exponentformat = "E")
  ay &lt;- list(nticks = 4,  showticklabels = TRUE,  tickfont = f2,  showgrid=F,  zeroline=T,  showline=T,  range =c(0,max(mtcars$disp*1.2)),  exponentformat = "E")
  
  plot_ly(x = mtcars$mpg  , y = mtcars$disp) %&gt;%
    add_trace(type = 'scatter', mode = 'markers', 
              marker = list(color = c('black'))) %&gt;%
    add_lines(hoverinfo='none', line = list(color = 'black')) %&gt;%
    layout(title = 'A plot in science',yaxis = ay, xaxis = ax,
           showlegend = FALSE, hovermode = "y")
  </code></pre>
  
  <p>manipulating the values to be in the 10k plus range gives the desired output though: </p>
  
  <pre><code> mtcars$disp &lt;- mtcars$disp *100 
  </code></pre>