2-D plot
28 Feb 2024 10:45 #294686
by kitkat
English is not my native language, so I use Google Translator and apologize in advance for possible mistakes.
I'm on linuxcnc 2.8.4. I want to display several values on a virtual panel as a 2-D plot The GladeVCP documentation in section 6.18 mentions the HAL_Graph widget, but there is no description of how to work with this widget. Also, one of the axes of this HAL_Graph is the time axis, which does not quite fit my case.
The only solution that I have been able to come up with was to use the standard DrawingArea widget and draw on it using Cairo. Are there any other ways? I am open to any ideas.
I'm on linuxcnc 2.8.4. I want to display several values on a virtual panel as a 2-D plot The GladeVCP documentation in section 6.18 mentions the HAL_Graph widget, but there is no description of how to work with this widget. Also, one of the axes of this HAL_Graph is the time axis, which does not quite fit my case.
The only solution that I have been able to come up with was to use the standard DrawingArea widget and draw on it using Cairo. Are there any other ways? I am open to any ideas.
Please Log in or Create an account to join the conversation.
28 Feb 2024 10:56 #294687
by Mecanix
Seen this?
github.com/gkv311/occt-samples-gtk
github.com/gkv311/occt-samples-gtk
Please Log in or Create an account to join the conversation.
15 Mar 2024 07:23 #295940
by kitkat
So, the results.
I look at that OCCT GTK+ sample and remember about Matplotlib. So i use the Matplotlib.
Everything turned out well. But the size of the plot was too small. If I increase the size of the plot, the panel becomes disproportionately large and ugly. Therefore, I moved the plot to a separate window.
Final results: I have a button with a python script attached to it. Script takes some values from halpins. Then a plot is created with these values in a separate window. Everything is working well.
I look at that OCCT GTK+ sample and remember about Matplotlib. So i use the Matplotlib.
Everything turned out well. But the size of the plot was too small. If I increase the size of the plot, the panel becomes disproportionately large and ugly. Therefore, I moved the plot to a separate window.
Final results: I have a button with a python script attached to it. Script takes some values from halpins. Then a plot is created with these values in a separate window. Everything is working well.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
Moderators: HansU
Time to create page: 0.240 seconds