# Cones Size Problem

Hi
I have same problem as said in (Cones size changing unpredictably with unit vectors) properly.
If there is any solution for this problem that would be great if guide us.

With all the best,
Bijan

Hi every one:

Above problem solved by great @empet comment on (Confusing behaviour of go.Cone in 3D Scatter - wrong vector direction - #2 by empet)

Here is a sample code for future usage:

``````import plotly.graph_objects as go
import plotly as plt
import numpy as np
import random as rnd

def rndata():

a=-20
b=20
n=1
rslt=[]
for i in range(n):
rslt.extend([rnd.randint(a,b),rnd.randint(a,b),None])

return rslt

fig = go.Figure()

for i in range(10):
x= rndata()
y=rndata()
z=rndata()

size=((x-x)**2+(y-y)**2+(z-z)**2)**0.5
axis=[(x-x)/size,(y-y)/size,(z-z)/size]

u=[axis,None]
v=[axis,None]
w=[axis,None]
xx=[x,None]
yy=[y,None]
zz=[z,None]

cl=rnd.choice(plt.colors.DEFAULT_PLOTLY_COLORS)
sizes=rnd.randint(1,10)
colorscale=[cl,cl],
anchor='tip', #['tip', 'tail', 'cm', 'center']
x=xx,
y=yy,
z=zz,
u=u,
v=v,
w=w,

text=str(sizes))

fig.update_layout(scene_aspectmode='data',)
fig.show()
``````