title: Plot convex-hull in 3D using plotly
body: <p>I am trying to use <code>plotly</code> to plot the 3D convex-hull of a set of points. I am using <code>Mesh3d</code> objects but the surfaces are not created correctly (see the picture below). How can I fix this?</p>
  
  <pre><code>import plotly.graph_objects as go
  import itertools, math, numpy as np
  
  from scipy.spatial import ConvexHull
  
  # This simply creates a set of points:
  n = 3
  m = 3
  E = np.array(list(itertools.product(np.arange(-1, 1.1, .5), repeat=m)))
  V = [
   [-2.20676418,  1.53670924, -1.5541674 ],
   [ 0.63437404,  0.07306301,  3.82253086],
   [ 3.19989112,  0.71987311,  2.79373418]
  ]
  x = np.array([np.dot(V, e) for e in E])
  
  # Then I compute the convex hull using scipy:
  xc = x[ConvexHull(x).vertices]
  
  fig = go.Figure()
  fig.add_trace(go.Mesh3d(x=xc[:, 0], y=xc[:, 1], z=xc[:, 2], color="blue", opacity=.5))
  fig
  </code></pre>
  
  <p>Current output is:</p>
  
  <p><a href="https://i.stack.imgur.com/LMYNf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LMYNf.png" alt="enter image description here"></a></p>