matplotlib streamplot con un cambio de variables

Hi I'm an happy user of streamplot module in matplotlib (version 1.3). I've used it for plotting a stream flow in the usual way (vr(t,r),vphi(t,r) are velocity in 2D space, t the time basis and r 1D coordinate where I have measurements of vr and vphi)

from matplotlib import *
speed = np.sqrt(vr * vr + vphi * vphi)
lw = 15 * speed / speed.max()
fig = plt.figure(figsize=(10.,6.0))
ax = fig.add_subplot(111)
ax.streamplot(t, r, vt, vr, linewidth = lw, color='blue')

Now suppose that I've a variable u as function of t (u(t)). It has a monotonic dependence on t, i.e. it varies linearly with t. Now I would like to create the streamplot as a function of (u,r), i.e. something as


What I'm wondering is that, considering the algorithm at the basis of streamplot should I actually make a complete change of variables? i.e.

vt1(u) = vt(t)*d(u(t))/dt
vr1(u) = vr(t)*d(u(t))/dt

Am I right or there is something I do not understand?

preguntado el 09 de septiembre de 13 a las 10:09

I don't understand your question. If u = k t (which is how I interpret 'linear') then all you are doing is scaling your velocities by a fixed constant. -

I know, the question is that if I should have to or not. But probably the answer is yes in any case. Maybe I have asked without thinking to much. I apologize -

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.