2-D plot

More
28 Feb 2024 10:45 #294686 by kitkat
2-D plot was created 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.

Please Log in or Create an account to join the conversation.

More
28 Feb 2024 10:56 #294687 by Mecanix
Replied by Mecanix on topic 2-D plot

Please Log in or Create an account to join the conversation.

More
28 Feb 2024 11:14 #294688 by kitkat
Replied by kitkat on topic 2-D plot
It looks like overkill. But I'll try it. Thanks!

Please Log in or Create an account to join the conversation.

More
15 Mar 2024 07:23 #295940 by kitkat
Replied by kitkat on topic 2-D plot
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.
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.126 seconds
Powered by Kunena Forum