How to reverse axis values when using plotly?
<p>Here is the program I used:</p>

<pre><code>library(plotly)

mydata = read.csv("data_to_plot.txt")
df = as.data.frame(mydata)

p &lt;- df %&gt;%
  group_by(X) %&gt;%
  plot_ly(x = ~Y, y = ~X, z = ~Z, type = "scatter3d", mode = "lines")
p  
</code></pre>

<p>and below is an excerpt of "mydata":  </p>

<blockquote>
  <p>df[1:12,]<br>
     X         Y            Z<br>
  1  1 0.2818017 0.0005993884<br>
  2  1 0.2832173 0.0007896421<br>
  3  1 0.2846330 0.0010293849<br>
  4  1 0.2860487 0.0013282462<br>
  5  1 0.2874643 0.0016969544  </p>
</blockquote>

<p>I would like to have the X values reversed on the X-axis, but can't find how to modify my program. Details of the <code>plotly</code> syntax are quite obscure to me. Could someone afford some help?
Many thanks.</p>

<p>Data plotted:
<a href="https://i.stack.imgur.com/d69IJ.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/d69IJ.jpg" alt="enter image description here"></a></p>