Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » Scatter: FEATURE IDEAS (1 already done)
icon14.gif  Scatter: FEATURE IDEAS (1 already done) [message #25670] Sun, 07 March 2010 12:31 Go to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
hi andrej

i more and more get warmer with the Scatter, really like it and the interface. had developped own diagram control, but yours is far better Smile i will try to provide some ideas though, to maybe enhance functionality of Scatter and if i can also the solutions. then you decide..

1) attached value popup
when clicking into diagram, a popup appears, and remains static, while moving clicked to other locations. better to have the popup travel with mouse showing values, isn't it? best, to have it selectable, which behaviour to have. attached a solution, maybe you like it..it does not have it swicthable though, but it works.

2) zooming / moving
when zooming out extremely (in tab8 i.e) the scatter hangs somewhere. the zoom is always realizes/painted respect to the SetXYMin Values. better would be to realize zoom centered to the current mous position, which is not that easy, i know, had my struggles Smile. also logrithmic stuff is hard to handle as hell. maybe the problem is that the frature of drawing funcitons stands in the way..

3) marks drawing
it would be cool to have the drawing reticle marks selected dynamicly according to zoomfactor also, they are already accrding to move position, but zooming zooms also the reticle.
i.e devisions -100 .. 50 .. 0 .. 50 .. 100 would step by step be changed to -75 .. -25 .. 25 .. 75 then -50 .. 25 .. 0 .. 25 .. 50
may be i can provide you a testcase with my diagram in this sense, it adapts the graph marks when moving and zooming

4) having graphs accessible via VectorMap, instead of Vector
i saw that one can access the data directly, but the data is organized in Vector< Vector<XY> >, which is ok, but when users dynamicly will want to access and modify same things, while other graphs are removed, the index is changed, and one needs to keep trak of indices in a map. wo why not using a map directly. the performance hit is neglectable anyway. this would hide away the index problem.

5) moving points of graphs
one of the goals in my diagram was to have it a sort of controling control, where one can drag some points of graph around, while some not, so i.e realizing parametrize of a eq filter bank or the like.

now these are some of the ideas i had in mind in my diagram. maybe you will find some of them usefull Smile in case of help needed, ask..
  • Attachment: Scatter.rar
    (Size: 9.56KB, Downloaded 376 times)
Re: Scatter: FEATURE IDEAS (1 already done) [message #25891 is a reply to message #25670] Wed, 17 March 2010 22:43 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
Hello Kohait00

Believe me. I have not seen your post before Sad

I have just uploaded the last Scatter version thanks to Andrei-Catalin. For now this is the last change from my side:

index.php?t=getfile&id=2409&private=0

It includes line styles that can be easily defined by user, x axis legend can have more than one line, and precision has been improved (thanks to use of fround() instead of int() to round double into integer). There are also functions that limit the max and min zoom.

You have included a lot of ideas. Let's wait Andrei to know his opinion. I repeat that it is enough for me now, but new features could be interesting and if necessary I could help too.
  • Attachment: dib.PNG
    (Size: 21.91KB, Downloaded 1152 times)


Best regards
Iñaki
Re: Scatter: FEATURE IDEAS (1 already done) [message #25902 is a reply to message #25891] Thu, 18 March 2010 20:36 Go to previous messageGo to next message
andrei-catalin is currently offline  andrei-catalin
Messages: 62
Registered: May 2006
Location: Romania
Member
Certainly the number of options for a chart can be much higher. There are many aspects that could be customized. For now, Scatter can be considered only a starting point or a basic package. A list of new features that you want and concrete ideas would be formed. But I think that should be developed a new charting package, better structured and which to use painter.

Andrei
Re: Scatter: FEATURE IDEAS (1 already done) [message #25911 is a reply to message #25902] Fri, 19 March 2010 09:17 Go to previous messageGo to next message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

I agree with you Andrei!
andrei-catalin wrote on Thu, 18 March 2010 21:36

Certainly the number of options for a chart can be much higher. There are many aspects that could be customized. For now, Scatter can be considered only a starting point or a basic package. A list of new features that you want and concrete ideas would be formed. But I think that should be developed a new charting package, better structured and which to use painter.

Andrei

Re: Scatter: FEATURE IDEAS (1 already done) [message #26205 is a reply to message #25911] Mon, 12 April 2010 18:57 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
tojocky wrote on Fri, 19 March 2010 09:17

I agree with you Andrei!
andrei-catalin wrote on Thu, 18 March 2010 21:36

Certainly the number of options for a chart can be much higher. There are many aspects that could be customized. For now, Scatter can be considered only a starting point or a basic package. A list of new features that you want and concrete ideas would be formed. But I think that should be developed a new charting package, better structured and which to use painter.

Andrei




Hello all

I think Scatter works rather well for now with actual design. Of course there is a lot of space for improvements:

- Some of kohait00 ideas
- Add menus in Scatter class (zoom in/out, fit, ...)
- Implement new features in layout designer
- More graphs like 2D bars
- Documentation
- Perhaps to add a second name for Scatter class, like "Plot2D"

However, if I would have 20 hours for it I would begin a new Plot3D package to get things like this:

index.php?t=getfile&id=2483&private=0

  • Attachment: dib.PNG
    (Size: 49.01KB, Downloaded 1149 times)


Best regards
Iñaki
easying the API [message #26556 is a reply to message #26205] Tue, 11 May 2010 12:37 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
hey all,

having had a look at the API again, i was wondering why all the Vector<> stuff hasnt been packed into a struct or something to have all info combined, and to let the data be publically accessible, so user can modify data directly, trigger a refresh and be happy, the interface easily would shrink to half of current, what do you think?

@koldo: how far is your Plot3D stuff Smile

[Updated on: Tue, 11 May 2010 12:37]

Report message to a moderator

capsulated Scatter Vectors [message #26557 is a reply to message #26556] Tue, 11 May 2010 15:07 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
hey guys, trying to simplify the API, here comes the first shot
it simply combines all the Vectors used for a Graph unit into one struct.

i commented out what is not nessesary anymore so that you see what could be left out. tried not to touch what is not nessesary.
even the names have been kept the same, which could be accomodated to be better variable names when leaving the Graph Vectors public.

it is a current svn compare (with my previous movable Popup fix, see above).. so you can use svn diff.

comments please Smile
cheers
  • Attachment: Scatter.rar
    (Size: 739.98KB, Downloaded 345 times)
Re: easying the API [message #26558 is a reply to message #26556] Tue, 11 May 2010 15:50 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
Hello kohait00

Quote:

having had a look at the API again, i was wondering why all the Vector<> stuff hasnt been packed into a struct or something to have all info combined


I agree. I did not touch it because I did not wanted to touch original andrei implementation and this is not an important issue in package development.

In fact I was thinking on other areas for radically improving speed with huge data sets.

Quote:

@koldo: how far is your Plot3D stuff


Ah, it was not my intention to do it. If you have time you can do it Smile.


Best regards
Iñaki
Re: capsulated Scatter Vectors [message #26559 is a reply to message #26557] Tue, 11 May 2010 16:12 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
kohait00 wrote on Tue, 11 May 2010 15:07

hey guys, trying to simplify the API, here comes the first shot
it simply combines all the Vectors used for a Graph unit into one struct.

i commented out what is not nessesary anymore so that you see what could be left out. tried not to touch what is not nessesary.
even the names have been kept the same, which could be accomodated to be better variable names when leaving the Graph Vectors public.

it is a current svn compare (with my previous movable Popup fix, see above).. so you can use svn diff.

comments please Smile
cheers


Hello kohait00

I do not feel very comfortable with the changes.

You have included inside source code a Scatter.rar file with a different version of some files. For example, for Scatter.cpp there are three version:
- The original
- The one in Scatter.rar
- The one in Scatter.rar inside Scatter.rar

In other side, there are a lot of internal changes. However there is no additional features for the user so I do not now if it is worthwhile.

For me it is important to know Andrei's opinion. Meanwhile I will include ProcessPopUp() that I think it is a nice feature.




Best regards
Iñaki
Re: capsulated Scatter Vectors [message #26561 is a reply to message #26559] Tue, 11 May 2010 16:33 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
hey koldo, thx for replying

forget about the Scatter.rar in Scatter.rar. it was a remamanet from last change which i forgot to delete when making the new archive.

the topmost stuff is the current.

i agree with changing API not beeing a good idea. but during time i really got to apriciate a simple API, where not too much is beeing hidden from user, actually thinking, that the data comes from user, and user decides what to do with it, beeing the scatter graph only menas of visualizing them at some time. the Vector Containers as members are pretty cool capsulation of data handling on their own. so why IMHO unnessesarely exporting add/remove data extra.

the whole thing is driven by the idea of keeping controls simple. to use and understand, and concerning their visualisation, beeing still in control of all (Refresh() especially.

this was just an idea anyway, which i wanted to provide for anyone in need..i will continue to merge some of my diagram stuff, which is not that performant, but has some of the "complicated" features described initially.

@Plot3D, this thing is cool, but I have no time to do it Smile one very fast ends up implementing own 3d engine, transform matrixes, viewpoints, world matrixes and all that (depending on rotation, translation and all of that). isnt there any lib already available for that (i mean computing 3d stuff in software, besides Mesa/DRI)?

another question: why the seperation between Parameters data points and Functional plots data points? couldnt they be managed all at in one? or is it a performance issue?

Re: capsulated Scatter Vectors [message #26562 is a reply to message #26561] Tue, 11 May 2010 16:53 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
Quote:

@Plot3D, this thing is cool, but I have no time to do it Smile one very fast ends up implementing own 3d engine, transform matrixes, viewpoints, world matrixes and all that (depending on rotation, translation and all of that). isnt there any lib already available for that (i mean computing 3d stuff in software, besides Mesa/DRI)?


Hello kohait00

If I would do it I would implement it in OpenGL. U++ has an OpenGL demo that can be a very basic base.


Best regards
Iñaki

[Updated on: Tue, 11 May 2010 17:31]

Report message to a moderator

Re: capsulated Scatter Vectors [message #26563 is a reply to message #26559] Tue, 11 May 2010 17:17 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

koldo wrote on Tue, 11 May 2010 16:12

However there is no additional features for the user so I do not now if it is worthwhile.

Hi,

Just my two cents: I agree with kohait that having direct access to the data is IMHO a nice feature. Plots in PlotCtrl (which I still hope to finish during summer Rolling Eyes ) actually has Vector as its public base class. I believe that it is faster and simpler and it also allows in some cases to apply some general algorithms (e.g. Sort) on the data without pushing them back and forth.

Also I believe that the API doesn't have to change, just extend. If you keep the old functions and just add the direct access to data, there should be no problems with backward compatibility.

Sorry if I didn't understand kohaits idea exactly, I just quickly scanned through the sources he posted...

Best regards,
Honza
Re: capsulated Scatter Vectors [message #26566 is a reply to message #26563] Tue, 11 May 2010 22:16 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
thanks guys for participating, its fun developing like that Smile

here comes a version where i tried to remove the commented unnecessary stuff and have unified the usage of dthe Plot Data, merging the 2 cases of a given values plot and the drawing functions plot. it works just the same, and as benefit, the interface becomes more straightforward.

API:
i agree with keeping API compatible to old stuff. but the problem here is that the functions for adding data plots and function plots don't match syntactically.

porting is actually an easy thing to do, if accompishing to name the public members of the class well, this woule encourage (enforce) the users of Scatter to quickly port their app.

another way could be to hide the new implementatio in own namespace. Something like SlimScatter::Scatter, so a user later can decide about the porting point easily.. an to make the real Scatter a separate wrapper class, that keeps the old API but only translates it to the new Scatter, which would keep out all the compatibility thing from the new Scatter

something like
namespace SlimScatter
{
class Scatter
{
//new clean implementation
}
}

class Scatter : public SlimScatter::Scatter
{
//wrapping functions only
}


@kolo: OpenGL ofcorse is best Smile maybe i take a look in there...
  • Attachment: Scatter2.rar
    (Size: 728.79KB, Downloaded 295 times)
Re: capsulated Scatter Vectors [message #26581 is a reply to message #26566] Wed, 12 May 2010 22:29 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
Hello Kohait00

I have reviewed your code and it is difficult for me to find significant advances over the old one. In fact many times the old code from user point of view has less lines and follows more U++ style.

An area easy to implement and very advantageous would be to improve data entering. Now data sets have to be entered point by point so in many times data is duplicated.

So it would be great to let linking external data sets from:

- C arrays
- ArrayCtrl columns
- GridCtrl columns

What do you think about it?


Best regards
Iñaki
Re: capsulated Scatter Vectors [message #26583 is a reply to message #26581] Wed, 12 May 2010 23:07 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
Quote:


the old code from user point of view has less lines and follows more U++ style.



I totaly agree on that one. my changes have neither performance improvements nor beauty changes. the point its all about is, to define what is the core of the Scatter control. as of my point of view it is the data, not the API (which was to be read fine but was hiding away the data too much and IMHO bloatet the API a bit).

andrejs goal was to have a Scatter control with a neat API to post stuff to and forget about it. my goal is to be able to access the data of the graphs in tried and true containers' manner (Vector..) and thus public and to see the Scatter just as a wrap over the data, which, upon triggering of Refresh()/Paint() draws a representation of it. so its basicly a question of design goals.

the current solution could be improved in readability by changing the PData members' names to something more usefull, which i havent done so far (wanting to keep the visibility where the members came from and to make compare in svn easy not to change too much at once). also, the "more lines" stuff could be done better, by returning PData & instead of Scatter & AddSeries..
i will provide a cleaned up version to sea what i mean.

from code point of view, my current code leaves the control with almost only the code needed to draw the data. as api see the Vector<PData> API which is cool as well. another benefit is that functional plots are handled just the way normal plots are.. making code clearer again.

i hope this came clear..it was not my goal to enhance the api but simplify it by leaving stuff accessible instead of hiding it behind api. (this is what i learned as well that sometimes its better not to hide)

Quote:


So it would be great to let linking external data sets from:

- C arrays
- ArrayCtrl columns
- GridCtrl columns



this is a great idea.. could be done in some Additional AddSeries() functions..

BTW: OpenGL, i am starting to like it.. the only thing is to create the vertices from data, set the viewpoint and have the stuff rotate depending on mouse position as seen on a surface of a bounding sphere.

Re: capsulated Scatter Vectors [message #26585 is a reply to message #26583] Thu, 13 May 2010 09:06 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
Hello Kohait00

If the final design from user point of view has:

- The same or less lines of code
- Follows U++ style as much as possible
- With a cleaner interface and better access to data

I will try to help you to convince Andrei to approve the changes.

Do not forget that to set basic Scatter data there are three type of functions:

1. Simplest: Just assign

Scatter& Scatter::SetLegendWeight(const int& weight)
{
	legendWeight=weight;
	return *this;
}


2. Less simple: Check data and assign

Scatter& Scatter::H_Border(const int& poz_x)
{
	if(poz_x>=0) 
		px=poz_x;
	return *this;
}


3. More complex: Do some actions and assign

Scatter &Scatter::SetMajorUnits(double ux, double uy) 
{
	xMajorUnit=ux;
	yMajorUnit=uy;
	yMajorUnit2=yRange2*yMajorUnit/yRange;
	AdjustMinUnitX();
	AdjustMinUnitY();
	AdjustMinUnitY2();
	return *this;
}

(I like these "return *this" Smile )

This way many times to use = to assign internal data is not enough Smile.


Best regards
Iñaki
Re: capsulated Scatter Vectors [message #26587 is a reply to message #26585] Thu, 13 May 2010 11:05 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
(const int& weight)

Why? Smile
Re: capsulated Scatter Vectors [message #26588 is a reply to message #26587] Thu, 13 May 2010 15:31 Go to previous messageGo to next message
andrei_natanael is currently offline  andrei_natanael
Messages: 262
Registered: January 2009
Experienced Member
Why not 3 different version of Scatter? The version of Andrei Catalin will remain the same and Koldo version and Konstantin version will build up onto Catalin version. I think everyone try to achieve something different. Soon or later we'll see which idea stand. That's why we have bazaar and we're not forced to work on others code if we don't like his style or idea. Razz
IMO a Scatter should follow MVC pattern, that would make easy to have a series of points in a Vector and multiple views of it in Scatter (just an idea).
About API design... http://doc.trolltech.com/qq/qq13-apis.html

Andrei
Re: capsulated Scatter Vectors [message #26639 is a reply to message #26588] Mon, 17 May 2010 19:17 Go to previous messageGo to next message
andrei-catalin is currently offline  andrei-catalin
Messages: 62
Registered: May 2006
Location: Romania
Member
I agree with Natanael. Why not multiple versions?

Andrei-Catalin

[Updated on: Mon, 17 May 2010 19:18]

Report message to a moderator

Re: capsulated Scatter Vectors [message #26641 is a reply to message #26639] Mon, 17 May 2010 21:31 Go to previous messageGo to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
Quote:


Koldo version and Konstantin version will build up onto Catalin version.



i'd prefer to build on someones code, ofcorse. deriving and extending a class is best. but in this case, my code change implies making data components public. so i cant derive from andrej's code. on the other hand, it'd be great not to have to duplicate code in the Scatter versions, i.e. the drawing routines, which i pretty like.

nevermind, if it is possible and easy to do, we could split the code, crediting the sources to andrej ofcorse, and i could start to include some of the ideas described earlier. Smile

PS: MVC pattern is nice and great to do tings..but i remember a wise man (mirek Smile saying: simplicity is a virtue on it's own. i think the building pieces for own ideas (Ctrl's, Container's, plug-ins) are simple and structured enough to take advantage of their API where possible..without the need to invent own API just to hide a memeber that has a great API on its own anyway.
Previous Topic: LEMON - a Library for Efficient Modeling and Optimization in Networks
Next Topic: Dockind: does not work with latest U++ release.
Goto Forum:
  


Current Time: Thu Mar 28 12:01:25 CET 2024

Total time taken to generate the page: 0.01980 seconds