Normalize arrow size to be the same using create_quiver

Hello all,
I am trying to add a quiver plot to my dash app comparing the wind directions of different sources using the create_quiver function of the plotly.figure_factory package. The arrows I get have different lengths depending on the wind speed. However, my aim is t plot only the direction. I tried normalizing the wind components this way :

N = np.sqrt(u**2 + v**2)
u, v = u/N, v/N

but I still get arrows with different lengths.

My goal is to get something similar to this result obtained with matplotlib, where I used the same normalization approach:

Any guidance is appreciated :smiling_face:

EDIT:

Hi @AitAhmed,

using the example of the quiver plot:

import plotly.figure_factory as ff
import numpy as np

x,y = np.meshgrid(np.arange(0, 2, .2), np.arange(0, 2, .2))
u = np.cos(x)*y
v = np.sin(x)*y

fig = ff.create_quiver(x, y, u, v, scaleratio=0.1, scale=0.5)
fig.show()

creates:

Applying your approach seems to work:

import plotly.figure_factory as ff
import numpy as np
![newplot (33)|690x168](upload://i8AYByBc8UrYBgdY1QXejq9bACe.png)

x,y = np.meshgrid(np.arange(0, 2, .2), np.arange(0, 2, .2))
u = np.cos(x)*y
v = np.sin(x)*y

N = np.sqrt(u**2 + v**2)

u /= N
v /= N

fig = ff.create_quiver(x, y, u, v,scaleratio=0.1, scale=0.5)
fig.show()

creates:

Thank you for your help ! It is working as desired now, it seems that specifying a value for scaleratio argument changes everything.