Home » Developing U++ » UppHub » PlotCtrl
PlotCtrl [message #22818] |
Wed, 19 August 2009 05:37  |
|
Hi,
I was looking around here for a simple way to plot mathematical functions, scientific data etc., but haven't found anything useful. Maybe I just wasn't looking hard enough I remember I've seen here some package about a year ago, but couldn't find it now. Anyway, I decided to write my own widget for that. And because I read here about the Painter for quite some time I thought it might be good opportunity to learn bit more about it.
In the attached file, you will find package containing simple, Painter based and hopefully easy to use class PlotCtrl. Simple example application and basic documentation are also included.
Main features of PlotCtrl are:
- Draws axes, including tics and labels
- Stores multiple independently configurable datasets
- Allows selection of line color and style
- Easy zooming using mouse
There are still some rough edges and I'm well aware it's not suitable for use in any serious application. So consider it alpha version please There is a bug in labeling algorithm, sometimes it falls into infinite loop, but it only happens on extreme zoom values. It is not very fast but after several minutes of physical computation few more milliseconds is nothing I'm just warning you that it is definitely not meant for realtime or animation purposes. Although I tried to optimize it a little, for large datasets it still takes some time to redraw.
I've tried too keep the class interface as much in U++ style as possible but there is few design decision that differ a bit for the sake of simplicity. I apologize for that and also for my not really readable code. Hopefully it will not repel you from trying this package, I'm looking forward to your comments and suggestions.
Bye,
Honza
[EDIT: Removed the file, see newest version below.]
[Updated on: Sat, 22 August 2009 13:43] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Fri May 02 22:34:34 CEST 2025
Total time taken to generate the page: 0.01042 seconds
|