I'm working with visual python on a project where I need to simulate a physical movement.
I'd开发者_运维问答 like to present, in a different window than the one the actual, 3D sim is running, two graphs, both related to the movement:
How the velocity and angular velocity progress over time.
How the movement and rotation progress over time.
All these vars are refreshed once per cycle (inside a while(true)
)
How can I accomplish this?
Thank you for your time!
If you're looking to do plots of live data you can use matplotlib. Here's a live plotting example:
http://eli.thegreenplace.net/files/prog_code/wx_mpl_dynamic_graph.py.txt | Screenshot
It uses wx but matplotlib has bindings for QT or GTK. Alternatively you could use the rpy2 interface to hook into R which has an excellent plotting engine and may be slightly faster for large amounts of data.
I've accomplished what I wanted with gdisplay
. Reference: here
精彩评论