title: Specifying marker size in data unit for plotly
body: <p>I switched from <code>matplotlib</code> to <code>plotly</code> mainly to plot smooth animations in 2D/3D. I want to plot the motion of robots consisting of multiple circles/spheres.</p>
  <p>The different body parts of the robot have different sizes and the circles need to represent that accurately.
  Is there a way in <code>plotly</code> to specify the size of the markers in data units?
  For example, I want to draw a 5m x 5m section in which circles with a radius of 0.1m are moving along different trajectories.</p>
  <p>In matplotlib I know two alternatives. One is to use patches <code>matplotlib.patches.Circle</code>. The second option is to plot the points and scale their <code>markersize</code> correctly by taking the dpi into account (<a href="https://stackoverflow.com/questions/19394505/matplotlib-expand-the-line-with-specified-width-in-data-unit">See the answers to this question for matplotlib</a>).</p>
  <p>A) Is it possible to animate shapes in plotly (3D)?</p>
  <p>or</p>
  <p>B) Is there a way to specify the size of the markers in data units or scale the <code>sizeref</code> attribute correctly?</p>
  <pre><code># Point with radius 2 (approx.)
  from plotly.offline import plot
  import plotly.graph_objs as go
  
  trace = go.Scatter(x=[4], y=[4],
                     mode='markers',
                     marker={'size': 260, 'sizeref': 1})  # ???
  
  layout = dict(yaxis=dict(range=[0, 10]),
                xaxis=dict(range=[0, 10]))
  
  fig = dict(data=[trace], layout=layout)
  plot(fig, image_height=1000, image_width=1000)
  </code></pre>
  <p>A problem with scaling the <code>markersize</code> is that the image is only correct as long as you don't zoom in or out, because the markersize stays constant.
  Therefore the cleaner approach would be to specify the size of the circles directly in data units.</p>