What is the input data type required by omni.ui.Plot?

In a talk at GTC 2022, NVIDIA demonstrated how to develop Omniverse extension for data visualization of digital twins. The extension reads data from DB and draw graphs.

I’m try to develop an extension that is similiar to the one in the talk , but instead of using static data, it can constantly read livestream data and updates the graphs in real time.

For creating these graph plots, I’m using “omni.ui.Plot”, but I’m having some issues that I couldn’t find the answers in the documentation.

1)What type of data should I pass in when creating instances of the “omni.ui.Plot” class? For example, numpy array / list…etc. I passed in an Integer List,but the graph won’t show.

ui.Plot(ui.Type.LINE, -1.0, 1.0, list(range(360)), 360, height=100)

2)I assumed the way to update the graphs is by using the method “set_data”, but I don’t know what type of data this method needs.

Any help is appreciated, thanks!

Hi @renton.hsu.vfx. The constructor and ui.Plot.set_data() both want the list of data passed in as individual arguments. You need to unpack your list as args with the * operator: DAQ/extension.py at 23afdd6e4772b3be3e7bc8895472dc6aab61841e · kericbowman/DAQ · GitHub

I linked to this specific extension because it plots real-time data.

Let me know if you have any questions.

1 Like

Problem solved! Thank you very much Mati, you have been very supportive!
Could you teach me how to find extension by purpose? There are too many extensions, I can’t read their description one by one.

1 Like

Thanks @renton.hsu.vfx. We have many of the primary extensions listed in the docs: Extensions Overview — Omniverse Extensions documentation We’re working on better discoverability of extensions.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.