Plotting scatterplots

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
escanor
Earned a small fee
Earned a small fee
Posts: 10
Joined: Sun Jun 10, 2018 1:57 am

Plotting scatterplots

Post by escanor » Wed Oct 02, 2019 6:43 pm

Hi All,

I have never done any sort of plotting on wxwidgets and I now need to add some scatter plots to my application.
I need to be able to do a live simulation on the graph so I need it to be in real-time.
Does anyone have any experience updating a live graph using some widgets?

Thanks,

User avatar
doublemax
Moderator
Moderator
Posts: 14183
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Plotting scatterplots

Post by doublemax » Wed Oct 02, 2019 8:43 pm

There are a few plotting libraries for wxWidgets:
https://wiki.wxwidgets.org/Graphics#Graphing_Functions

But i've never used any of them, so i can't make any recommendations or even say if they're suitable for your purpose.

But depending on what you need, writing something on your own shouldn't be too hard. And it would give you total control over the performance.
Use the source, Luke!

escanor
Earned a small fee
Earned a small fee
Posts: 10
Joined: Sun Jun 10, 2018 1:57 am

Re: Plotting scatterplots

Post by escanor » Wed Oct 02, 2019 9:18 pm

Thanks for getting back, I was able to get something rough working with wxCharts but I haven't gotten to the 'real-time' performance portion yet. Would be awesome if someone else has used wxCharts for something like this in the past. I'll keep the thread open for a few days and see if anyone gets back.

Also, a few things I found out after doing some research (might be useful to someone who comes across this in the future).

1) It is possible to use matplotlib with C++ but you have to do some linking with python.
2) You can actually even call matlab functions from within C++.

Unfortunately 1,2 would not be possible for my application. Perhaps this will help someone in the future.

Kvaz1r
Earned some good credits
Earned some good credits
Posts: 132
Joined: Tue Jun 07, 2016 1:07 pm

Re: Plotting scatterplots

Post by Kvaz1r » Wed Oct 02, 2019 9:25 pm

As for wxCharts...if chosen chart type has support of updating chart data you can update it by timer or whenever it needs. From sample.

Post Reply