[Matplotlib-users] Possible bug (or unclear docs) with quiver
Hi, trying to create a velocity plot for a 2d ode and superimposing it onto a trajectory, I am encountering some issues with quiver. Let ns1(x,t) be a vector function defining the ode, ready to be integrated with scipy odeint and actually invariant with t. Here, x is a 1d state array with 2 entries. I get the velocity field by first creating vectors of interesting points on the two axis, say xg and yg. Then I make a grid with xxg, yyg = np.meshgrid(xg, yg) and I finally compute the velocity components as vel = np.asarray(map(lambda x1, x2: ns1((x1,x2),0), xxg.flat, yyg.flat)) u=vel[:,0] v=vel[:,1] Now, I try to superimpose a trajectory with the velocity plot. However, after having plotted the integrated trajectory, I cannot call plt.quiver(xxg, yyg, u, v) because the u and v components have very different ranges. Trying to normalize as plt.quiver(xxg, yyg, u/xrange, v/yrange) looks (almost) right, but it is not nice to have to precompute the ranges. I was expecting plt.quiver(xxg, yyg, u, v, angles='xy') to do the job automatically, but this is not the case. For points with null x coordinate my arrows always have null length, while this was not the case with the previous test. any clue? -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Filled Curves
Hi,
I am a new user of matplotlib.
First of all I would like to say that the people working on matplotlib is
doing a great job.
Well, I have tried to use the 'fill', but I cannot get rid of the lines.
I have tried to use 'linewidth=0' at the end, but it did not work.
Could somebody, please, tell me if I am doing something wrong ?
Thank you.
Sergio.
--
#!/usr/bin/env python
from pylab import *
from matplotlib.patches import Polygon
t = arange(0.0, 1.0+0.01, 0.01)
s1 = t
s2 = t*t
s3 = t*t*t
text(0.50, 0.4,
r"$d(f_2,f_3)$", horizontalalignment='center',
color= '#8f0100', fontsize=30)
xticks(size=20)
yticks(size=20)
fill(t, s3, '#e9ccce', linewidth=0)
fill(t, s2, 'w', linewidth=0)
savefig('diamxn2.eps')
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Filled Curves
Hi,
I am a new user of matplotlib.
First of all I would like to say that the people working on matplotlib is
doing a great job.
Well, I have tried to use the 'fill', but I cannot get rid of the lines.
I have tried to use 'linewidth=0' at the end, but it did not work.
Could somebody, please, tell me if I am doing something wrong ?
Thank you.
Sergio.
--
#!/usr/bin/env python
from pylab import *
from matplotlib.patches import Polygon
t = arange(0.0, 1.0+0.01, 0.01)
s1 = t
s2 = t*t
s3 = t*t*t
text(0.50, 0.4,
r"$d(f_2,f_3)$", horizontalalignment='center',
color= '#8f0100', fontsize=30)
xticks(size=20)
yticks(size=20)
fill(t, s3, '#e9ccce', linewidth=0)
fill(t, s2, 'w', linewidth=0)
savefig('diamxn2.eps')
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
