You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thank you for providing this library! It helped me a great deal in my project!
I had some issues with it though when dealing with very large time-series data and a lot of different plots. When you have a certain number of plots, it no longer makes sense to have a single listbox with them. You need a way to structure that in ImGui.
I made a small helper module that deals with those issues. It assumes that the data is ordered by time and uses that to render only the visible part. It also separates the ui element that enables a specific plot (plot_history()) from the actual drawing of the ui element with all the plots in it (plot_draw()).
Using this, you can place lots of plot_history calls in your UI code and structure it however you like.
The downside is that you need to keep track of a Plot pointer for each plot window, but usually you just have one plot window, so it's not really an issue.
Another feature is that plot_history() will call your get_value-lambda only for the parts of the plot that are visible. This way it will remain fast, even if you have lots of data, and you can compute values on the fly.
You can also supply different units to the plots in a very simple way (with Plot_Y_Axis).
Different units can then by scaled independently and a separate axis is shown for each visible unit.
I think this code might also be useful for others. You can look at it here: https://github.com/helmutbuhler/odrive_control_ui/blob/master/control_ui/plot.h
In that repo is also an application and a short video that demonstrates the usage.
Do you guys think it makes sense to integrate that stuff in implot, or maybe as an example in implot_demos?
The text was updated successfully, but these errors were encountered:
First of all, thank you for providing this library! It helped me a great deal in my project!
I had some issues with it though when dealing with very large time-series data and a lot of different plots. When you have a certain number of plots, it no longer makes sense to have a single listbox with them. You need a way to structure that in ImGui.
I made a small helper module that deals with those issues. It assumes that the data is ordered by time and uses that to render only the visible part. It also separates the ui element that enables a specific plot (plot_history()) from the actual drawing of the ui element with all the plots in it (plot_draw()).
Using this, you can place lots of plot_history calls in your UI code and structure it however you like.
The downside is that you need to keep track of a Plot pointer for each plot window, but usually you just have one plot window, so it's not really an issue.
Another feature is that plot_history() will call your get_value-lambda only for the parts of the plot that are visible. This way it will remain fast, even if you have lots of data, and you can compute values on the fly.
You can also supply different units to the plots in a very simple way (with Plot_Y_Axis).
Different units can then by scaled independently and a separate axis is shown for each visible unit.
I think this code might also be useful for others. You can look at it here:
https://github.com/helmutbuhler/odrive_control_ui/blob/master/control_ui/plot.h
In that repo is also an application and a short video that demonstrates the usage.
Do you guys think it makes sense to integrate that stuff in implot, or maybe as an example in implot_demos?
The text was updated successfully, but these errors were encountered: