|
|
Home » Developing U++ » UppHub » PlotCtrl revisited
PlotCtrl revisited [message #27956] |
Thu, 12 August 2010 07:16  |
|
Hello all 
I finally got time to finish some of my ideas on PlotCtrl and PlotLib. I brought the code to state where I am not ashamed of it, at least for most of the parts The interfaces are mature now and the code style got quite close to u++ standards.
I am not even sure what everything changed since last time, so I try to really quickly sum up all the features...
- PlotCtrl allows graphical presentation of XY data
- LegendCtrl shows legend based on data in associated PlotCtrl
- PlotStyleDlg lets user dynamically change the properties (title, color, symbol, ...) of any series in associated PlotCtrl.
- PlotCtrl provides easy handling of the view area using mouse.
- User can define his own PlotSymbol just by inheriting from WithPlotSymbol<> templated class and overiding one virtual function.
- PlotLib is an underlaying package that takes care over all the rendering using Painter. It can be used separately to create plots and render them to image files (thanks to Painter it works even on headless machines without X server).
- The axis on the plots are quite unusual and still need some attention, but they represent my idea how scientific data in various ranges should be handled...
I'm pretty sure I forgot something important as always... You should get better idea if you have a look at the example apps, PlotLibExample and PlotCtrlExample, that are included 
It still needs some work, but I think I could finally upload it to bazaar now.
Best regards,
Honza
-
Attachment: PlotCtrl.zip
(Size: 36.62KB, Downloaded 363 times)
|
|
|
Re: PlotCtrl revisited [message #27957 is a reply to message #27956] |
Thu, 12 August 2010 07:19   |
|
PS: To show something closer to real time usage, here is a simple tool to show multiple graphs loaded from XY data files from disk. I added #ifdef-ed demo mode where some suitable files are created first and opened automatically, so you have something to play with 
Honza
-
Attachment: Grapher.zip
(Size: 6.01KB, Downloaded 340 times)
|
|
|
|
|
Re: PlotCtrl revisited [message #27984 is a reply to message #27977] |
Thu, 12 August 2010 19:43   |
|
koldo wrote on Thu, 12 August 2010 16:22 | Hello Honza
Good job.
I would prefer a Plot3DCtrl but anyway, it shows how U++ is so powerful.
|
I wrote some code displaying and manipulating series of data in 3D few years ago... Thinking about it, it must have been quite long ago, it was in pascal/Lazarus Maybe I could find some of it and rewrite it to U++. But I never did any support for planes 
Honza
|
|
|
|
Re: PlotCtrl revisited [message #28402 is a reply to message #28375] |
Tue, 31 August 2010 18:59   |
|
kohait00 wrote on Tue, 31 August 2010 10:40 | impressing..
what will happen to Scatter 
|
Thanks Kohait 
Scatter and PlotCtrl will live happily side by side There are things that PlotCtrl can't do and Scatter can and vice versa. It will be always up to the programmer to choose which one suits his needs better.
Honza
|
|
|
|
Re: PlotCtrl revisited [message #28413 is a reply to message #28409] |
Wed, 01 September 2010 10:45   |
|
kohait00 wrote on Tue, 31 August 2010 22:05 | merging isnt bad either. i havent taken much insight into PlotCtrl yet..it seems more potent..
|
I'm against merging those two. They can borrow ideas or even code from each other, but they have different purpose. Scatter is a full-blown widget, while PlotCtrl is only simple graphical extension of PlotLib. And PlotLib has much wider use than displaying data on screen 
Honza
|
|
|
|
|
|
Re: PlotCtrl revisited [message #29952 is a reply to message #29949] |
Wed, 01 December 2010 12:38   |
|
kohait00 wrote on Wed, 01 December 2010 11:46 | PlotCtrl and PlotLib still not in bazaar...any reason why?
|
Hello Kohait,
I think the only reason is that I never put it there I think no one so far was interested enough to make me do it I'll check if I have rights to commit to bazaar and upload it later today...
Honza
|
|
|
|
Re: PlotCtrl revisited [message #29954 is a reply to message #29953] |
Wed, 01 December 2010 13:29   |
|
Committed. It lacks any documentation at the moment, but I'll try to fix that ASAP. I think you know how to use it anyway and at least the example code is commented.
Also looking at it now, it reminded me, that the axis drawing needs to be rewritten I got few ideas and hope I get some time to implement them soon...
BTW: Do you use it for something interesting? I am very interested 
Best regards,
Honza
|
|
|
|
Re: PlotCtrl revisited [message #29957 is a reply to message #29956] |
Wed, 01 December 2010 14:33   |
|
kohait00 wrote on Wed, 01 December 2010 13:32 | it'll be for a parametrisation graph in audio section, system response, frequency, gain, quality of filters etc..
|
Seems interesting, if you need some generalizations to PlotLib to make it more universal and fit your needs, don't hesitate to contact me 
kohait00 wrote on Wed, 01 December 2010 13:32 | BTW: what happened to Grapher, the cool test app for PlotCtrl?
will you commit it too?
|
I believe that it has been renamed to PlotCtrlExample And it is available in bazaar too.
Honza
|
|
|
|
Re: PlotCtrl revisited [message #29971 is a reply to message #29962] |
Wed, 01 December 2010 18:56  |
|
kohait00 wrote on Wed, 01 December 2010 16:57 | ahh..i see..
BUT:
Grapher used to open things from file..PlotCtrlExample cant..
sure that its the same?
|
Oh, I see Sure, I was wrong, it is another project But I think it doesn't really fit into bazaar, as it is a full app, with quite specific purpose. The archive few posts above is actually up-to-date, I haven't done any work on it since I post it (I had to do something else and then completely forgot about it ).
Honza
|
|
|
Goto Forum:
Current Time: Sat Apr 26 18:28:03 CEST 2025
Total time taken to generate the page: 0.01114 seconds
|
|
|