yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #02414
Re: Python force - plot
I also get such error when I try to plot:
/home/chia/YADE-r2039-law/lib/yade-bzr2039/py/yade/__init__.pyc in plot()
105 if y1: plots_p_y1.append(d)
106 else: plots_p_y2.append(d)
--> 107
plotLines[p]=pylab.plot(*sum([[data[p],data[d[0]],d[1]] for d in
plots_p_y1],[]))
108 pylab.legend([_p[0] for _p in
plots_p_y1],loc=('upper left' if len(plots_p_y2)>0 else 'best'))
109 pylab.ylabel(','.join([_p[0] for _p in plots_p_y1]))
KeyError: 'step'
Is there any particular reason? How is it that for you is working? Is that
up to me or to the release I am using?
Thanks, Chiara
On 22 February 2010 13:11, Anton Gladky <gladky.anton@xxxxxxxxx> wrote:
> Yes, I used:
> InteractionDispatchers(
> [Ig2_Sphere_Sphere_Dem3DofGeom(),Ig2_Facet_Sphere_Dem3DofGeom()],
> [Ip2_FrictMat_FrictMat_FrictPhys()],
> [Law2_Dem3DofGeom_FrictPhys_Basic()],
> ),
>
> because your contact law is not in a trunk.
>
> ______________________________
>
> Anton Gladkyy
>
>
> 2010/2/22 chiara modenese <c.modenese@xxxxxxxxx>
>
>>
>>
>> On 22 February 2010 12:48, Anton Gladky <gladky.anton@xxxxxxxxx> wrote:
>>
>>> Hi,
>>>
>>> 2) your script works normally for me. At least this string:
>>> plot.addData(fn=inter.phys.normalForce,step=O.iter)
>>> I needed to delete the last parameter, because: AttributeError:
>>> 'FrictPhys' object has no attribute 'contactpoint'
>>>
>>> Hi Anton,
>>
>> oh yes I typed that wrong, the last parameter should be
>> un=s0.shape['radius']-2*inter.geom.contactpoint[0]
>> But I am still getting that error, you don't? So you can see the plot?
>> Using another contact law, I mean (since I do not yet have commit the one I
>> am testing).
>>
>> Chiara
>>
>>
>>
>>> ______________________________
>>>
>>> Anton Gladkyy
>>>
>>>
>>> 2010/2/22 chiara modenese <c.modenese@xxxxxxxxx>
>>>
>>>> Hi Vaclav,
>>>>
>>>> two simple questions on python:
>>>>
>>>> 1) How do I apply a force (not the gravity) to the bodies? Which engine
>>>> should I call?
>>>>
>>>> 2) I get this error using the PeriodicPythonRunner engine to create some
>>>> plots:
>>>>
>>>> NameError: name 'myAddPlotData' is not defined
>>>>
>>>> But I defined the function in the python script so I do not understand
>>>> why it is giving me an error. Moreover if I try to access the data as
>>>> plot.data['fn'] it gives me an error, too.
>>>> I attach the python script.
>>>>
>>>> Cheers,
>>>> Chiara
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
>>>> Post to : yade-users@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
>>>> More help : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
>>> Post to : yade-users@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
>>> More help : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
>> Post to : yade-users@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
>> More help : https://help.launchpad.net/ListHelp
>>
>>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
> Post to : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
> More help : https://help.launchpad.net/ListHelp
>
>
References