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 Control
Re: Scatter v0.3 [message #6891 is a reply to message #6885] Sun, 03 December 2006 18:37 Go to previous messageGo to next message
andrei-catalin is currently offline  andrei-catalin
Messages: 62
Registered: May 2006
Location: Romania
Member
Quote:

Capitalisation of plotFunction and some of other methods seems inconsistent with both rest of class and U++...
Quote:

Necessary, but I don't read too well your hint. Could you give me a piece of advice?

Quote:

If there is no special reason, I would use "PlotFunction"





Thank for illustration. I've translated "capitalisation" as "exploitation"...

I will analyse better PrintPreview method.

Andrei
Scatter v0.3, PieChart v0.1 [message #7372 is a reply to message #6891] Sat, 23 December 2006 19:43 Go to previous messageGo to next message
andrei-catalin is currently offline  andrei-catalin
Messages: 62
Registered: May 2006
Location: Romania
Member
This is the new package containing both scatter and pie charts adapted for upp 612-dev2.

Season's greetings!

Andrei

Scatter-new version [message #9092 is a reply to message #6350] Tue, 17 April 2007 05:54 Go to previous messageGo to next message
andrei-catalin is currently offline  andrei-catalin
Messages: 62
Registered: May 2006
Location: Romania
Member
Scatter v0.5 & Pie v0.2

Changes:


added a info box to show x-y coordinate at left click

customisable format for grid labels

axis label supports special characters via WString

a new more extensible testScatter package

many other optimizations


__________________________________
tested with MINGW & MSC71 compilers
(Win32, UPP 2007.1)


Andrei
Re: Scatter-new version [message #9172 is a reply to message #9092] Thu, 19 April 2007 22:12 Go to previous messageGo to next message
ebojd is currently offline  ebojd
Messages: 225
Registered: January 2007
Location: USA
Experienced Member
Thanks Andrei,

I get a number of errors starting with:

Scatter.cpp:546 WinMetaFileDraw not declared in scope... It looks like it includes the appropriate files. Any quick ideas on what to look into?

I'm currently running the final release of 2007.1 with gcc-4.1.1 on gentoo linux.

EBo --

ps: I would love to cut and paste the error messages from upp, but for some reason the text is not being coppied to the publicly accessible clipboard.

Re: Scatter-new version [message #9177 is a reply to message #9172] Thu, 19 April 2007 23:35 Go to previous messageGo to next message
guido is currently offline  guido
Messages: 169
Registered: April 2006
Experienced Member
ebojd wrote on Thu, 19 April 2007 22:12

Thanks Andrei,

I get a number of errors starting with:

Scatter.cpp:546 WinMetaFileDraw not declared in scope... It looks like it includes the appropriate files. Any quick ideas on what to look into?

I'm currently running the final release of 2007.1 with gcc-4.1.1 on gentoo linux.

EBo --

ps: I would love to cut and paste the error messages from upp, but for some reason the text is not being coppied to the publicly accessible clipboard.




EMF is a win32 thing not yet supported elsewhere.
I have attached a version with WIN32 platform conditionals.
Except IsMetaFile() checks, which I just removed out of laziness.
Also gcc4 didn't like mixing enum with bool (BOTTOM, TOP), so I hacked it up with #define.

I investigated EMF support for Unixes. But it is tricky as already existing libs, like libwmf and libemf, make use of Wine headers, inheriting the LGPL license that way.

PS:
Forgot to explain: I allowed myself to change "BUTTOM" to "BOTTOM" Very Happy

Guido

[Updated on: Thu, 19 April 2007 23:38]

Report message to a moderator

Re: Scatter-new version [message #9183 is a reply to message #9177] Fri, 20 April 2007 06:49 Go to previous messageGo to next message
andrei-catalin is currently offline  andrei-catalin
Messages: 62
Registered: May 2006
Location: Romania
Member
Quote:

I have attached a version with WIN32 platform conditionals.



Very nice to hear that Scatter can run on Linux. Thanks.


Andrei
Re: Scatter-new version [message #9196 is a reply to message #9183] Fri, 20 April 2007 17:44 Go to previous messageGo to next message
ebojd is currently offline  ebojd
Messages: 225
Registered: January 2007
Location: USA
Experienced Member
Just got it to work (I put my U++ source trees on an NTFS partition so they are the same for both Linux and XP -- for some reason writing to the NTFS partition from Linux pukes every once and awhile)...

Thanks again for the pointer!

It will have to be this weekend before I can look seriously in the code, but it looks like it has at least some of the functionality I need.

One of the reason I was looking at gnuplot was the ability to process the data on the fly (like histograms, box-wisker plots, switching between log-log, log-normal, and linear plots which we use all the time). With any luck Scatter will provide enough of the base functionality to justify writing all the other stuff Wink

EBo --
Re: Scatter-new version [message #9462 is a reply to message #9196] Wed, 09 May 2007 12:08 Go to previous messageGo to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
Hi Andrei,

nice work!

i have two questions:
1st which license do you apply to your code? BSD?
2nd what about using DrawText with angle in Scatter::SetDrawing, so you can turn the gridLabels as needed.


Bas
Re: Scatter-new version [message #9464 is a reply to message #9462] Wed, 09 May 2007 14:18 Go to previous messageGo to next message
andrei-catalin is currently offline  andrei-catalin
Messages: 62
Registered: May 2006
Location: Romania
Member
1. Yes, likewise Upp
2. thanks for suggestion

Andrei
Re: Scatter-new version [message #9970 is a reply to message #9092] Mon, 11 June 2007 18:36 Go to previous messageGo to next message
jlfranks is currently offline  jlfranks
Messages: 57
Registered: May 2007
Location: Houston, TX, USA
Member
I need to extend this to do a histogram of the style in the
first example figure at http://en.wikipedia.org/wiki/Histogram

My first thought is to sub-class from Scatter to create the
reguired functionality. Do you think this is the way to go?

Any suggestions would be helpful?

--jlf
Re: Scatter-new version [message #9975 is a reply to message #9970] Tue, 12 June 2007 07:11 Go to previous messageGo to next message
andrei-catalin is currently offline  andrei-catalin
Messages: 62
Registered: May 2006
Location: Romania
Member
Actually, scatter package contains only scatter chart and pie chart types. IMO, the histogram chart could be implemented rather easy from scratch, without scatter class derivation.

Andrei
Re: Scatter-new version [message #11643 is a reply to message #9975] Thu, 20 September 2007 13:51 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

I'm using the scatter ctrl. It is very useful.
I miss, maybe I do not find it, a method to clear the screen from all the points.

Luigi
Re: Scatter-new version [message #11676 is a reply to message #11643] Fri, 21 September 2007 06:05 Go to previous messageGo to next message
andrei-catalin is currently offline  andrei-catalin
Messages: 62
Registered: May 2006
Location: Romania
Member
Hi Luigi,

RemoveSeries(series number) method should work.

Andrei
Re: Scatter-new version [message #11681 is a reply to message #11676] Fri, 21 September 2007 13:31 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
andrei-catalin wrote on Fri, 21 September 2007 06:05

Hi Luigi,

RemoveSeries(series number) method should work.

Andrei


Hi Andrei,

yes, it works:

	for (int i=scatter.GetPData().GetCount() - 1; i>=0; i--) scatter.RemoveSeries(i);

It doesn't work if I start from 0 and move toward the last serie. Maybe some interaction with GetCount() that is changing during the removal.
Thank you,

Luigi
Re: Scatter-new version [message #11734 is a reply to message #11681] Mon, 24 September 2007 06:01 Go to previous messageGo to next message
andrei-catalin is currently offline  andrei-catalin
Messages: 62
Registered: May 2006
Location: Romania
Member
To simplify your task you must use the current version of Scatter.

Scatter v0.6 features:

4 new methods (tested in "Operations" tab):

void RemoveAllSeries();

void RemoveAllFSeries();

const Vector<String> & GetPLegend() const {return vLegend;}

const Vector<String> & GetFLegend() const {return vFLegend;}



Added PopUpInfo class to show the coordinates outside of plotting area

3 new tests: Dynamic, Log and Operations

Added conditional compilation directives for WinMetafile

Andrei

[Updated on: Tue, 25 September 2007 07:22]

Report message to a moderator

Re: Scatter-new version [message #11739 is a reply to message #11734] Mon, 24 September 2007 16:14 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
andrei-catalin wrote on Mon, 24 September 2007 06:01

To simplify your task you must use the current version of Scatter.

Scatter v0.6 features:

4 new methods (tested in "Operations" tab):

void RemoveAllSeries();

void RemoveAllFSeries();

const Vector<String> & GetPLegend() const {return vLegend;}

const Vector<String> & GetFLegend() const {return vFLegend;}



Added PopUpInfo class to show the coordinates outside of plotting area

3 new tests: Dynamic, Log and Operations

Added conditional compilation directives for WinMetafile

Andrei




Thanks Andrei, this control is becoming better and better.
I've compiled the example using mingw of latest dev version and got some error that I removed as reported:

1. in Scatter.cpp
popText.SetColor(::Color(200,220,255));
instead of:
popText.SetColor(class::Color(200,220,255));

2. in Pie.h
static void DrawPie(Draw& w, Point centre, int r, int start, int alpha, int width=0, class::Color fill=Null, class::Color outline=Black,uint64 pattern=0,class::Color background=White);

(just added 'static' to remove the mismatch of declaration)

3. in testScatter2.h
scatter7.PlotFunction(f1,String("funct")+AsString(topIndex));
...
scatter7.AddSeries(s,String("series")+AsString(topIndex),true);

instead of

scatter7.PlotFunction(f1,String("funct")<<topIndex);
...
scatter7.AddSeries(s,String("series")<<topIndex,true);


Luigi

[Updated on: Mon, 24 September 2007 16:16]

Report message to a moderator

Re: Scatter-new version [message #11757 is a reply to message #11739] Tue, 25 September 2007 07:26 Go to previous messageGo to next message
andrei-catalin is currently offline  andrei-catalin
Messages: 62
Registered: May 2006
Location: Romania
Member
Thanks,

I've updated Scatter v.06 archive to remove reported errors.

Andrei
Re: Scatter-new version [message #15139 is a reply to message #11757] Wed, 02 April 2008 16:44 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Andrei, thanx for such a good control. I use it in my U++ based program.
One thing could be useful in control properties: property changing format of displaying numbers at axes tickes. Or by default we may have following:

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

Look at numbers at vertical axis of top graph. It would be good to enter something like "%.2f" to view only needed significant digits.
  • Attachment: axes.JPG
    (Size: 78.07KB, Downloaded 987 times)
Re: Scatter-new version [message #15146 is a reply to message #15139] Wed, 02 April 2008 22:37 Go to previous messageGo to next message
andrei-catalin is currently offline  andrei-catalin
Messages: 62
Registered: May 2006
Location: Romania
Member
You may use your own format:

void FormatY(String& s, int i, double d)
{
   s=Format("%.2f",d);	
}


and apply it for Y axis

   scatter6.cbModifFormatY=THISBACK(FormatY);


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

Andrei
  • Attachment: test.png
    (Size: 12.44KB, Downloaded 970 times)
Re: Scatter-new version [message #15147 is a reply to message #15146] Wed, 02 April 2008 23:39 Go to previous messageGo to previous message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Thanx!
Is there any documentation on your control?
Previous Topic: Fresh TabBar proposals
Next Topic: usvn - SVN for dummies (and me)
Goto Forum:
  


Current Time: Fri Mar 29 00:50:17 CET 2024

Total time taken to generate the page: 0.03409 seconds