Skip to content

How to live graph in python [mjvFigure]? #298

Discussion options

You must be logged in to vote

I agree with @JeanElsner's answer, but if you do want to use mjvFigure, it should be possible.
Please share the code you used to try to replicate profiler_update.

I'd follow what happens in simulate.cc to figtimer, and check that your code does all of it:

  1. It's initialized with mjv_defaultFigure - this will be done for you automatically by the Python bindings.
  2. Various properties are set on it for axes, colours, etc.
  3. figtimer.linepnt and figtimer.linedata are set.
  4. On every frame, profilershow is called, which calls mjr_figure with a particular viewport and the render context. This would be mujoco.mjr_figure in python.

Replies: 6 comments 8 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@yuvaltassa
Comment options

@rohit-kumar-j
Comment options

@yuvaltassa
Comment options

@rohit-kumar-j
Comment options

@rohit-kumar-j
Comment options

Answer selected by rohit-kumar-j
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@yaoxt3
Comment options

@rohit-kumar-j
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants