Options for Plotting for wxWidgets

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
georgeplusplus
Knows some wx things
Knows some wx things
Posts: 25
Joined: Tue May 11, 2021 1:49 pm

Options for Plotting for wxWidgets

Post by georgeplusplus »

I have been trying out some plotting options that exist for wxwidgets and its looking like they dont really fit my use case.

I have to plot a large amount of points (about 200k - 2million). It is purely for visual representation and not analysis so I dont need to render points. I need fast rendering of lines for a large range of points.

I have tried wxCharts which seems to be the more feature rich one, but it is way too slow using wxMath2DPlotData.

wxMathPlot is a bit faster but very unappealing UI look.

If I plot the same data on python using matplotlib it only takes about 1 to 2 seconds to appear which I find suspicious that C++ would be slower. Matplotlibs features and performance would be great for my use case. (can manipulate ranges, can save an image, good performance)

Does anyone have recommendations for plotting solutions inside wxwidgets?? I was even looking at using wxWebView and javascript since theres so much lack of library support for plotting options inside wxwidgets..
User avatar
doublemax
Moderator
Moderator
Posts: 19103
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Options for Plotting for wxWidgets

Post by doublemax »

I don't think there are any "secret" math plot components for wxWidgets that nobody knows about.

Try widening your search to any C/C++ lib that can render into a bitmap.

And, depending on your needs, it might be easier and faster to just code something yourself.
Use the source, Luke!
georgeplusplus
Knows some wx things
Knows some wx things
Posts: 25
Joined: Tue May 11, 2021 1:49 pm

Re: Options for Plotting for wxWidgets

Post by georgeplusplus »

"I don't think there are any "secret" math plot components for wxWidgets that nobody knows about." - I feel like my use case seems basic enough where people have run into this and can share what they used.

I think where wxCharts is getting bogged down is Math2DPlot plots circles and is probably really taxing on the CPU making all those render calls. Is there a way to just plot a line in wxCharts that I am missing?

I might have to roll my own plot class worst case scenario.
utelle
Moderator
Moderator
Posts: 1125
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: Options for Plotting for wxWidgets

Post by utelle »

georgeplusplus wrote: Sat Jul 31, 2021 10:10 am Does anyone have recommendations for plotting solutions inside wxwidgets??
A few years ago I was in a similar situation searching for a professional plotting solution. Back then the problem was that none of the Open-Source solutions supporting wxWidgets was in such a shape that I needed. Therefore I chose a commercial solution, ChartDirector - IMHO one of the best charting libraries available at a fair price (99 USD for a developer license). I have implemented a wxWidgets component for it and published a report on the wxWidgets Developer Blog: wxChartDir - Using ChartDirector in wxWidgets applications.

Of course, it depends on the type of application you are developing whether ChartDirector could be an option for you or not.

Regards,
Ulrich
[email protected]
In need of some credit
In need of some credit
Posts: 1
Joined: Wed Apr 27, 2022 12:50 pm

Re: Options for Plotting for wxWidgets

Post by [email protected] »

I found this that I guess can plot on image as well. So simply we need to write a code that it plot on bmp or jpg
https://alandefreitas.github.io/matplotplusplus/

Also the a bit uglier one is plplot that it has been available for years and it has wxwidgets driver as well as others
http://plplot.sourceforge.net
Post Reply