You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
(24) |
Dec
(19) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(22) |
Feb
(5) |
Mar
(10) |
Apr
(12) |
May
(6) |
Jun
(3) |
Jul
(6) |
Aug
(7) |
Sep
(1) |
Oct
(3) |
Nov
(4) |
Dec
(1) |
2008 |
Jan
|
Feb
(4) |
Mar
(6) |
Apr
(10) |
May
(2) |
Jun
(4) |
Jul
(15) |
Aug
(11) |
Sep
(3) |
Oct
|
Nov
(9) |
Dec
(11) |
2009 |
Jan
(6) |
Feb
(9) |
Mar
(24) |
Apr
(4) |
May
(7) |
Jun
(1) |
Jul
|
Aug
|
Sep
(3) |
Oct
(1) |
Nov
(1) |
Dec
(10) |
2010 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(8) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
(6) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Debora H. <DHe...@ao...> - 2008-04-22 14:07:58
|
Thanks Jamie - I'll try that. Deb -----Original Message----- From: Jamie McQuay [mailto:ja...@sc...] Sent: Tuesday, April 22, 2008 9:56 AM To: npl...@li... Subject: Re: [Nplot-devel] Nplot problem Hi Deb, This is likely to do something with the .Net version 3 framework. I just get the code from trunk and compiled with vs 2005 and .net 2.0. Nothing has been done yet with regards to version 3 as we are also supporting the mono framework. Jamie ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jamie McQuay Scimatic Software Inc. +1.416.529.9069 www.scimatic.com We build software for scientists. On 21-Apr-08, at 2:19 PM, dhe...@ao... wrote: > > I am using VS2005 .NET 3.0, C#, Windows XP. The Nplot library > (version 0.9.10.0) works great - except, > > > > 1. When the context menu option 'Original Dimensions' is > clicked, it display all of the labels on the x axis in a clump. The > PhysicalSpacing min is set to 25 - which works fine until the > 'Original Dimensions' is clicked. > > 2. When expanding the x-axis - if it is expanded too far, it > bombs in NPlot.Axis in the Draw routine: {"Index was out of range. > Must be non-negative and less than the size of the collection.\r > \nParameter name: index"} at the line: "this.DrawTicks( g, > physicalMin, physicalMax, out labelOffset, out tickBounds );" > > > > I wanted to compile NPLOT to debug the problem, but cannot. There > are 2 errors: > > > > "System.Windows.Forms.PaintEventArgs does not contain a definition > for X" > > "System.Windows.Forms.PaintEventArgs does not contain a definition > for Y" > > > > I have installed MSBEE. Can you help point me in the right direction? > > > > Thanks, Deb > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save > $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javao ne > _______________________________________________ > Nplot-devel mailing list > Npl...@li... > https://lists.sourceforge.net/lists/listinfo/nplot-devel ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javao ne _______________________________________________ Nplot-devel mailing list Npl...@li... https://lists.sourceforge.net/lists/listinfo/nplot-devel __________ NOD32 3045 (20080422) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.com |
From: Jamie M. <ja...@sc...> - 2008-04-22 13:55:36
|
Hi Deb, This is likely to do something with the .Net version 3 framework. I just get the code from trunk and compiled with vs 2005 and .net 2.0. Nothing has been done yet with regards to version 3 as we are also supporting the mono framework. Jamie ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jamie McQuay Scimatic Software Inc. +1.416.529.9069 www.scimatic.com We build software for scientists. On 21-Apr-08, at 2:19 PM, dhe...@ao... wrote: > > I am using VS2005 .NET 3.0, C#, Windows XP. The Nplot library > (version 0.9.10.0) works great – except, > > > > 1. When the context menu option ‘Original Dimensions’ is > clicked, it display all of the labels on the x axis in a clump. The > PhysicalSpacing min is set to 25 – which works fine until the > ‘Original Dimensions’ is clicked. > > 2. When expanding the x-axis – if it is expanded too far, it > bombs in NPlot.Axis in the Draw routine: {"Index was out of range. > Must be non-negative and less than the size of the collection.\r > \nParameter name: index"} at the line: “this.DrawTicks( g, > physicalMin, physicalMax, out labelOffset, out tickBounds );” > > > > I wanted to compile NPLOT to debug the problem, but cannot. There > are 2 errors: > > > > “System.Windows.Forms.PaintEventArgs does not contain a definition > for X” > > “System.Windows.Forms.PaintEventArgs does not contain a definition > for Y” > > > > I have installed MSBEE. Can you help point me in the right direction? > > > > Thanks, Deb > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save > $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Nplot-devel mailing list > Npl...@li... > https://lists.sourceforge.net/lists/listinfo/nplot-devel |
From: <DHe...@ao...> - 2008-04-22 13:33:23
|
Bartek, Looks like the code you are looking for is in the Nplot library file: Windows.PlotSurface2D.cs in the DoMouseMove function. Look for "if ( coordinates_.Active )" - the code you need is after the "if". I tried this: If you create a MouseClick event for your plotsurface instance and add the following code: Point here = new Point(e.X, e.Y); double x = plotSurface.PhysicalXAxis1Cache.PhysicalToWorld(here, true); double y = plotSurface.PhysicalYAxis1Cache.PhysicalToWorld(here, true); The x & y should be the coordinates you are looking for. Did you get the source code for Nplot to compile? Deb -----Original Message----- From: Bartek K [mailto:mor...@gm...] Sent: Monday, April 21, 2008 9:45 PM To: npl...@li... Subject: [Nplot-devel] obtaining xy coordinates on mousedown event Hello! Cant find solution to my problem.. When displaying plot with showcoordinates property set to 'true' i can see coordinates next to mouse cursor. The problem is I don't know how to assign current x/y coord to a variable. Any ideas would be appreciated! -- bartek kujda ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javao ne _______________________________________________ Nplot-devel mailing list Npl...@li... https://lists.sourceforge.net/lists/listinfo/nplot-devel __________ NOD32 3044 (20080421) Information __________ This message was checked by NOD32 antivirus system. _http://www.eset.com_ (http://www.eset.com) **************Need a new ride? Check out the largest site for U.S. used car listings at AOL Autos. (http://autos.aol.com/used?NCID=aolcmp00300000002851) |
From: Bartek K <mor...@gm...> - 2008-04-22 01:45:00
|
Hello! Cant find solution to my problem.. When displaying plot with showcoordinates property set to 'true' i can see coordinates next to mouse cursor. The problem is I don't know how to assign current x/y coord to a variable. Any ideas would be appreciated! -- bartek kujda |
From: <dhe...@ao...> - 2008-04-21 18:19:57
|
I am using VS2005 .NET 3.0, C#, Windows XP. The Nplot library (version 0.9.10.0) works great – except, 1. When the context menu option ‘Original Dimensions’ is clicked, it display all of the labels on the x axis in a clump. The PhysicalSpacing min is set to 25 – which works fine until the ‘Original Dimensions’ is clicked. 2. When expanding the x-axis – if it is expanded too far, it bombs in NPlot.Axis in the Draw routine: {"Index was out of range. Must be non-negative and less than the size of the collection.\r\nParameter name: index"} at the line: “this.DrawTicks( g, physicalMin, physicalMax, out labelOffset, out tickBounds );” I wanted to compile NPLOT to debug the problem, but cannot. There are 2 errors: “System.Windows.Forms.PaintEventArgs does not contain a definition for X” “System.Windows.Forms.PaintEventArgs does not contain a definition for Y” I have installed MSBEE. Can you help point me in the right direction? Thanks, Deb |
From: Bo Q. <qi...@gm...> - 2008-04-18 20:52:20
|
hi, Anyone has experience getting nplot work for wpf projects in C#? I am a totally newbie. Thanks a lot. Bo |
From: Jim G. <jam...@gm...> - 2008-04-04 13:37:54
|
Hi Mark Also, in general, you can register for COM interoperability without the source code by using the "regasm.exe" from the commandline. See, for example, http://edndoc.esri.com/arcobjects/9.2/NET/9826f81b-278c-49cc-a912-ab8d86f5e91e.htm You will have to do > regasm.exe <path to>/NPlot.dll /codebase ( the /codebase option is necessary unless the NPlot.dll is installed in the GAC). If you want to generate a type library for NPlot.dll that you can use from unmanaged C++, you can add the /tlb: option > regasm.exe NPlot.dll /tlb:NPlot.tlb This will also register the NPlot.dll for COM interop. If you want only a tlb, you will need to download the tlbexp.exe tool that's available in one of the SDKs (but not by default in the .NET 2.0 Framework). See http://www.microsoft.com/downloads/details.aspx?FamilyID=fe6f2099-b7b4-4f47-a244-c96d69c35dec&displaylang=en Regards, Jim On 3-Apr-08, at 6:49 AM, Jamie McQuay wrote: > > Hi Mark, > > Getting NPlot to work as an interop dll is not to hard to do. > > You will have to get the source version of NPlot from the trunk folder > from svn. > > 1. Open the source in visual studio > 2. Open the properties page > 3. Click on the Build tab > 4. Check the "Register for COM interop" checkbox > 5. recompile > > Now you have a dll that you can access from unmanaged C++ using the > COM interface. > > Jamie > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Jamie McQuay > Scimatic Software Inc. > +1.416.529.9069 > www.scimatic.com > > We build software for scientists. > > > > > On 3-Apr-08, at 6:43 AM, SourceForge.net wrote: > >> Feature Requests item #1933181, was opened at 2008-04-03 03:43 >> Message generated for change (Tracker Item Submitted) made by Item >> Submitter >> You can respond by visiting: >> https://sourceforge.net/tracker/?func=detail&atid=821571&aid=1933181&group_id=161868 >> >> Please note that this message will contain a full copy of the >> comment thread, >> including the initial issue submission, for this request, >> not just the latest update. >> Category: None >> Group: None >> Status: Open >> Priority: 5 >> Private: No >> Submitted By: Nobody/Anonymous (nobody) >> Assigned to: Nobody/Anonymous (nobody) >> Summary: Unmanaged code wrapper >> >> Initial Comment: >> Great tool! Using it in a program to review historical futures >> market trading. >> >> Does anyone have a wrapper to facilitate using NPlot in unmanaged C+ >> +? I'd love to use NPlot in our real time system, but I'm not very >> comfortable with interop yet. >> >> Alternatively, if someone who is comfortable with interop could >> sketch it out for me, I could try to write some chunks. >> >> Thanks. >> >> - Mark >> >> ---------------------------------------------------------------------- >> >> You can respond by visiting: >> https://sourceforge.net/tracker/?func=detail&atid=821571&aid=1933181&group_id=161868 >> >> ------------------------------------------------------------------------- >> Check out the new SourceForge.net Marketplace. >> It's the best place to buy or sell services for >> just about anything Open Source. >> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace >> _______________________________________________ >> Nplot-devel mailing list >> Npl...@li... >> https://lists.sourceforge.net/lists/listinfo/nplot-devel > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > Nplot-devel mailing list > Npl...@li... > https://lists.sourceforge.net/lists/listinfo/nplot-devel |
From: Jamie M. <ja...@sc...> - 2008-04-03 13:49:37
|
Hi Mark, Getting NPlot to work as an interop dll is not to hard to do. You will have to get the source version of NPlot from the trunk folder from svn. 1. Open the source in visual studio 2. Open the properties page 3. Click on the Build tab 4. Check the "Register for COM interop" checkbox 5. recompile Now you have a dll that you can access from unmanaged C++ using the COM interface. Jamie ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jamie McQuay Scimatic Software Inc. +1.416.529.9069 www.scimatic.com We build software for scientists. On 3-Apr-08, at 6:43 AM, SourceForge.net wrote: > Feature Requests item #1933181, was opened at 2008-04-03 03:43 > Message generated for change (Tracker Item Submitted) made by Item > Submitter > You can respond by visiting: > https://sourceforge.net/tracker/?func=detail&atid=821571&aid=1933181&group_id=161868 > > Please note that this message will contain a full copy of the > comment thread, > including the initial issue submission, for this request, > not just the latest update. > Category: None > Group: None > Status: Open > Priority: 5 > Private: No > Submitted By: Nobody/Anonymous (nobody) > Assigned to: Nobody/Anonymous (nobody) > Summary: Unmanaged code wrapper > > Initial Comment: > Great tool! Using it in a program to review historical futures > market trading. > > Does anyone have a wrapper to facilitate using NPlot in unmanaged C+ > +? I'd love to use NPlot in our real time system, but I'm not very > comfortable with interop yet. > > Alternatively, if someone who is comfortable with interop could > sketch it out for me, I could try to write some chunks. > > Thanks. > > - Mark > > ---------------------------------------------------------------------- > > You can respond by visiting: > https://sourceforge.net/tracker/?func=detail&atid=821571&aid=1933181&group_id=161868 > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > Nplot-devel mailing list > Npl...@li... > https://lists.sourceforge.net/lists/listinfo/nplot-devel |
From: SourceForge.net <no...@so...> - 2008-04-03 10:43:18
|
Feature Requests item #1933181, was opened at 2008-04-03 03:43 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821571&aid=1933181&group_id=161868 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Unmanaged code wrapper Initial Comment: Great tool! Using it in a program to review historical futures market trading. Does anyone have a wrapper to facilitate using NPlot in unmanaged C++? I'd love to use NPlot in our real time system, but I'm not very comfortable with interop yet. Alternatively, if someone who is comfortable with interop could sketch it out for me, I could try to write some chunks. Thanks. - Mark ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821571&aid=1933181&group_id=161868 |
From: SourceForge.net <no...@so...> - 2008-03-17 16:26:49
|
Bugs item #1916843, was opened at 2008-03-17 11:19 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821568&aid=1916843&group_id=161868 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: 0.9.10.0 Status: Open Resolution: None Priority: 5 Private: No Submitted By: David Palich (dpalich) Assigned to: Nobody/Anonymous (nobody) Summary: Zero Height Gradient Rectangle Brush Exception Initial Comment: There is an unhandled exception when creating a zero height gradient rectangle brush. How to Reproduce: Create a bar plot with the bars filled in vertical gradient mode (color changes along the y-axis). Manually resize the containing window until one of the bars becomes zero pixels high (with a non-zero data point). As soon as this happens, the application will crash with an unhandled exception. Recommended Fix: Before painting the bar for a data point, check for zero height. If zero height, maybe draw a single pixel line at that point, but don't bother creating the rectangle or gradient fill brush. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821568&aid=1916843&group_id=161868 |
From: Dave C. <dav...@gm...> - 2008-03-13 15:22:37
|
MT, Cross thread UI interaction is a big headache I've found. I've since moved from using the Form thread timer to a System.Threading.Timer. This way I can have an intermediate object receive events from the environment (tick server) and then build OHLC bars there. A form (or whatever object that needs to consume bars - 1 second, 5 second, 1 minute, etc.) requests a certain periodicity from the barbuilder object. This object then creates a Threading timer which emits bars at the specified interval. The form then consumes those events, saves the bars in a cache (datatable) and on that event repaints the graph. The problem of course is that this object's Threading timer thread is cross threaded from the form. And so I must perform a this.InvokeRequired test and use that method delegate: if (this.InvokeRequired) { this.Invoke(new MethodInvoker(ProcessLatestQuote)); return; } Even so, I'm getting what appear to be cross thread lockups at update frequencies of 2 seconds or less. So I'm thinking that in order to avoid these lockups I must do nothing aside from update a local cache of quotes on the Threading timer event - and get out fast. And then to lock(cache) {} while I perform a graph update. Sorry if this appears off-topic for this list. But the concept of graph updates on timers and cross threading is an issue that many will encounter when using NPlot to graph real time data. Regards, Dave Cline On Thu, Mar 13, 2008 at 6:44 AM, MT <mt...@ya...> wrote: > Thanks Dave, > > That example worked great for me. My mistake was to use System.Timers.Timer instead of Windows.Forms.Timer. System.Timers.Timer executes on an arbitrary thread which was the source of my problem I think. > -- ___________________ Dav...@gm... www.davecline.com Lake Oswego, OR 801-473-9213 ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ |
From: MT <mt...@ya...> - 2008-03-13 13:45:11
|
Thanks Dave, That example worked great for me. My mistake was to use System.Timers.Timer instead of Windows.Forms.Timer. System.Timers.Timer executes on an arbitrary thread which was the source of my problem I think. ----- Original Message ---- From: Dave Cline <dav...@gm...> To: npl...@li... Sent: Monday, March 10, 2008 9:34:09 PM Subject: Re: [Nplot-devel] Real-Time charting I built a simple trading example for MBTrading that uses NPlot graphing. It's way primitive - but demonstrates that indeed NPlot will deal with ticks and quotes and refreshes quite well. I've since revamped it considerably. I'll be posting the open sauce project up there sometime soon. You can find the source on Yahoo's group site for mbtrading. http://finance.groups.yahoo.com/group/mbtsdk/files/ MBTCSharpDemo.zip You'll need a demo account to MBTrading - but they're free... http://www.mbtrading.com/fx/demo.asp On Mon, Mar 10, 2008 at 6:08 PM, MT <mt...@ya...> wrote: > I hope it is ok for me to ask this question on this mailing list. Does nplot support real-time charting? If so are there any examples of it? If not, do you think it will be in future releases? I am getting threading exceptions when trying to refresh the chart series after updating the datasource. > > MT > > > > > ____________________________________________________________________________________ > Never miss a thing. Make Yahoo your home page. > http://www.yahoo.com/r/hs > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Nplot-devel mailing list > Npl...@li... > https://lists.sourceforge.net/lists/listinfo/nplot-devel > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Nplot-devel mailing list Npl...@li... https://lists.sourceforge.net/lists/listinfo/nplot-devel ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs |
From: Dave C. <dav...@gm...> - 2008-03-11 02:34:04
|
I built a simple trading example for MBTrading that uses NPlot graphing. It's way primitive - but demonstrates that indeed NPlot will deal with ticks and quotes and refreshes quite well. I've since revamped it considerably. I'll be posting the open sauce project up there sometime soon. You can find the source on Yahoo's group site for mbtrading. http://finance.groups.yahoo.com/group/mbtsdk/files/ MBTCSharpDemo.zip You'll need a demo account to MBTrading - but they're free... http://www.mbtrading.com/fx/demo.asp On Mon, Mar 10, 2008 at 6:08 PM, MT <mt...@ya...> wrote: > I hope it is ok for me to ask this question on this mailing list. Does nplot support real-time charting? If so are there any examples of it? If not, do you think it will be in future releases? I am getting threading exceptions when trying to refresh the chart series after updating the datasource. > > MT > > > > > ____________________________________________________________________________________ > Never miss a thing. Make Yahoo your home page. > http://www.yahoo.com/r/hs > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Nplot-devel mailing list > Npl...@li... > https://lists.sourceforge.net/lists/listinfo/nplot-devel > |
From: MT <mt...@ya...> - 2008-03-11 02:10:55
|
I hope it is ok for me to ask this question on this mailing list. Does nplot support real-time charting? If so are there any examples of it? If not, do you think it will be in future releases? I am getting threading exceptions when trying to refresh the chart series after updating the datasource. MT ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs |
From: SourceForge.net <no...@so...> - 2008-03-03 20:46:49
|
Bugs item #1688713, was opened at 2007-03-26 13:19 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821568&aid=1688713&group_id=161868 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: randalx (randalx) Assigned to: Jamie McQuay (jamcquay) Summary: Problems ploting single point Initial Comment: Hi, My program plots various LinePlots and PointPlots using the AbscissaData and OrdinateData. The data can change based on user interaction. A bug occurs when the data is for only one point. First there is an exception in DateTimeAxis.cs void DrawTicks(...) { ... PointF lastPos = WorldToPhysical((double)largeTicks[0], physicalMin, physicalMax, true);//ed The exception is due to accessing largeTicks[0]. The previous call to WorldTickPositions() fails to add any data to the largeTicks array. A quick fix was to add the following code: if (largeTicks.Count <= 0) { return; } But the result is not very satisfactory as I'd still like to see the point plotted. My temporary hack was to adjust the XAxis1.WorldMax and XAxis1.WorldMin by 100 so as to show a centered point but this is far from ideal. Thanks, Randal ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2008-03-03 12:39 Message: Logged In: NO Hi guys ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2007-05-11 01:43 Message: Logged In: NO I have rather similar problem with 5 point at LabelAxis.cs This is Stack Trace of 0.9.9.2 but it happen in 0.9.10.0 as well. System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.Collections.ArrayList.get_Item(Int32 index) at NPlot.LabelAxis.DrawTicks(Graphics g, Point physicalMin, Point physicalMax, Object& labelOffset, Object& boundingBox) in LabelAxis.cs:line 209 at NPlot.Axis.Draw(Graphics g, Point physicalMin, Point physicalMax, Rectangle& boundingBox) in Axis.cs:line 1280 at NPlot.PhysicalAxis.Draw(Graphics g, Rectangle& boundingBox) in PhysicalAxis.cs:line 125 at NPlot.PhysicalAxis.GetBoundingBox() in PhysicalAxis.cs:line 112 at NPlot.PlotSurface2D.DeterminePhysicalAxesToDraw(Rectangle bounds, Axis xAxis1, Axis xAxis2, Axis yAxis1, Axis yAxis2, PhysicalAxis& pXAxis1, PhysicalAxis& pXAxis2, PhysicalAxis& pYAxis1, PhysicalAxis& pYAxis2) in PlotSurface2D.cs:line 831 at NPlot.PlotSurface2D.Draw(Graphics g, Rectangle bounds) in PlotSurface2D.cs:line 972 at NPlot.Bitmap.PlotSurface2D.Refresh() in Bitmap.PlotSurface2D.cs:line 433 ---------------------------------------------------------------------- Comment By: Jamie McQuay (jamcquay) Date: 2007-03-29 09:26 Message: Logged In: YES user_id=613279 Originator: NO Code snippet: plotSurface.Clear(); DateTime[] xs = { new DateTime(2002, 9, 1)}; float[] ys = { 4.7f }; Marker m = new Marker(Marker.MarkerType.Diamond, 6, Color.DarkGreen); PointPlot pp = new PointPlot(); pp.AbscissaData = xs; pp.OrdinateData = ys; pp.Marker = m; plotSurface.Add(pp); LabelAxis lay = new LabelAxis(plotSurface.YAxis1); lay.AddLabel("P3", 3); lay.AddLabel("P4", 4); lay.AddLabel("P5", 5); plotSurface.YAxis1 = lay; plotSurface.Refresh(); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821568&aid=1688713&group_id=161868 |
From: FXHat - <fxh...@gm...> - 2008-02-27 19:08:17
|
I would like to export the plot surface to image (jpg, png, ..). Is this currently possible with NPlot? I'm using NPlot to plot charts like this<http://img3.freeimagehosting.net/uploads/dc4ac47fdd.png>. The thing is that the bottom surface can contain outliners. The result is that the outliners cause the ax values to take on absurd proportions (accommodate for the outliner). Is it possible to apply break lines? For example like this<http://img3.freeimagehosting.net/image.php?fa9a921adc.gif>, but a break line on the ax would be fine as well. I was trying to understand the NPlot library by looking throught the source code and documenation, but it's kind of hard to see how all the pieces fit together as a C# beginner. Any suggestions as to where to start? Regards, Jan |
From: SourceForge.net <no...@so...> - 2008-02-26 06:47:41
|
Bugs item #1630597, was opened at 2007-01-08 19:12 Message generated for change (Comment added) made by satyasmiles2000 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821568&aid=1630597&group_id=161868 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: 0.9.9.2 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Jamie McQuay (jamcquay) Summary: Overflow error when zooming to much Initial Comment: When you zoom in too much, you end up with a Overflow exception. Just open a graph with zoom enabled. Drag a box from left to right, and the height as small as posible - repeat until error. Stack-trace: at System.Drawing.Graphics.CheckErrorStatus(Int32 status) at System.Drawing.Graphics.FillPolygon(Brush brush, PointF[] points, FillMode fillMode) at System.Drawing.Graphics.FillPolygon(Brush brush, PointF[] points) at NPlot.FilledRegion.Draw(Graphics g, PhysicalAxis xAxis, PhysicalAxis yAxis) at NPlot.PlotSurface2D.Draw(Graphics g, Rectangle bounds) at NPlot.Windows.PlotSurface2D.Draw(Graphics g, Rectangle bounds) at NPlot.Windows.PlotSurface2D.DoPaint(PaintEventArgs pe, Int32 width, Int32 height) at NPlot.Windows.PlotSurface2D.OnPaint(PaintEventArgs pe) at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs) at System.Windows.Forms.Control.WmPaint(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ---------------------------------------------------------------------- Comment By: Satya Puvvada (satyasmiles2000) Date: 2008-02-26 12:17 Message: Logged In: YES user_id=2012175 Originator: NO This is happening in LinePlot too. When I zoomin to the lowest level, this is happening. I guess problem could be with Transform. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821568&aid=1630597&group_id=161868 |
From: SourceForge.net <no...@so...> - 2008-02-25 16:59:29
|
Bugs item #1901521, was opened at 2008-02-25 10:59 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821568&aid=1901521&group_id=161868 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Matthew McDougal (mmdoogie) Assigned to: Nobody/Anonymous (nobody) Summary: Y Axis recommendation extended while X Axis is not Initial Comment: I ran into a problem that I wouldn't have even noticed had I not been trying to use a LogAxis as the Y Axis on a plot. myPlotSurface.YAxis1 = new LogAxis(myLinePlot.SuggestYAxis) When I then tried to refresh my plot, it would fail saying I can't have negative data on a log axis, but of course I didn't have any negative data. Looking at the SequenceAdapter code in SVN, which I've trimmed a little just to get the relevant parts: public Axis SuggestXAxis() { Axis a = this.XAxisSuggester_.Get(); // The world length should never be returned as 0 // This would result in an axis with a span of 0 units // which can not be properly displayed. if (a.WorldLength == 0.0) { a.IncreaseRange(0.08); } return a; } public Axis SuggestYAxis() { Axis a = this.YAxisSuggester_.Get(); a.IncreaseRange(0.08); return a; } Basically, what occurs is on the X axis, the range is only increased if the returned axis was zero, but on the Y axis, it is always increased by +/- 8% of the range. If your span is sufficiently large enough, and your lower limit close enough to zero, the range can get extended negative. There may be a reason I don't know about, but if there isn't, I would suggest making the Y axis behave in the same manner as the X axis. --matt ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821568&aid=1901521&group_id=161868 |
From: SourceForge.net <no...@so...> - 2008-02-18 03:32:40
|
Feature Requests item #1895773, was opened at 2008-02-18 09:02 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821571&aid=1895773&group_id=161868 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Priority: 5 Private: Yes Submitted By: Satya Puvvada (satyasmiles2000) Assigned to: Nobody/Anonymous (nobody) Summary: Undo and Redo Feature on Surface Initial Comment: Hi, My program plots various LinePlots. Is there any way to work like Undo and Redo? For Ex: I have dragged NPlot from the position A to B. If I want to go back to A and see the graph at that point what is the process. Could pls let me know any way for this implementation? It is very much useful for graphical programming. Thanks, Satya.. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821571&aid=1895773&group_id=161868 |
From: SourceForge.net <no...@so...> - 2007-12-29 15:39:13
|
Feature Requests item #1709964, was opened at 2007-04-30 02:04 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821571&aid=1709964&group_id=161868 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: non trading days in TradingDateTimeAxis Initial Comment: TradingDateTimeAxis is actually removing only saturdays and sundays. I'd like non trading days (apart form weekends) to be removed as I get trend lines errors. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2007-12-29 07:39 Message: Logged In: NO I found another bug in the last correction posted here: the ticks labels were being created even for no tradding days. This little problem was corrected, just change the method "OnTradingDays" code of the class "TradingDateTimeAxis", for this: public bool OnTradingDays(double coord) { long ticks = (long)coord; long whole_days = ticks / TimeSpan.TicksPerDay; long days_in_last_week = whole_days % 7; bool retorno=true; if (!(days_in_last_week < 5)) { retorno = false; } else { DateTime aux = new DateTime(ticks); foreach (DateTime dt in exceptionalNonTradingDays) { if (aux == dt) { retorno = false; break; } } } return retorno; } Att. André Novais afn...@gm... ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2007-05-11 14:33 Message: Logged In: NO Hi, I've just modified TradingTimeAxis in order to allow non trading days to be removed from the axis... best, Davide. /* * NPlot - A charting library for .NET * * TradingDateTimeAxis.cs * Copyright (C) 2003-2006 Matt Howlett and others. * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. Neither the name of NPlot nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Drawing; using System.Collections; namespace NPlot { /// <summary> /// Provides a DateTime axis that removes non-trading days. /// </summary> public class TradingDateTimeAxis : DateTimeAxis { /// <summary> /// a list of non trading days /// </summary> private ArrayList exceptionalNonTradingDays; /// <summary> /// add a day to the list of non trading days /// </summary> /// <param name="dayToAdd">non trading day to add</param> public void AddNonTradingDay(DateTime dayToAdd) { if (!exceptionalNonTradingDays.Contains(dayToAdd)) { exceptionalNonTradingDays.Add(dayToAdd); } } // we keep shadow "virtual" copies of WorldMin/Max for speed // which are already remapped, so it is essential that changes // to WorldMin/Max are captured here /// <summary> /// The axis world min value. /// </summary> public override double WorldMin { get { return base.WorldMin; } set { base.WorldMin = value; virtualWorldMin_ = SparseWorldRemap(value); } } private double virtualWorldMin_ = double.NaN; /// <summary> /// The axis world max value. /// </summary> public override double WorldMax { get { return base.WorldMax; } set { base.WorldMax = value; virtualWorldMax_ = SparseWorldRemap(value); } } private double virtualWorldMax_ = double.NaN; /// <summary> /// Optional time at which trading begins. /// All data points earlied than that (same day) will be collapsed. /// </summary> public virtual TimeSpan StartTradingTime { get { return new TimeSpan(startTradingTime_); } set { startTradingTime_ = value.Ticks; tradingTimeSpan_ = endTradingTime_ - startTradingTime_; } } private long startTradingTime_; /// <summary> /// Optional time at which trading ends. /// All data points later than that (same day) will be collapsed. /// </summary> public virtual TimeSpan EndTradingTime { get { return new TimeSpan(endTradingTime_); } set { endTradingTime_ = value.Ticks; tradingTimeSpan_ = endTradingTime_ - startTradingTime_; } } private long endTradingTime_; private long tradingTimeSpan_; /// <summary> /// Get whether or not this axis is linear. /// </summary> public override bool IsLinear { get { return false; } } /// <summary> /// Constructor /// </summary> public TradingDateTimeAxis() : base() { exceptionalNonTradingDays = new ArrayList(); Init(); } /// <summary> /// Constructor /// </summary> public TradingDateTimeAxis(ArrayList nonTradingDays) : base() { exceptionalNonTradingDays = nonTradingDays; Init(); } /// <summary> /// Copy Constructor /// </summary> /// <param name="a">construct a TradingDateTimeAxis based on this provided axis.</param> public TradingDateTimeAxis(Axis a) : base(a) { exceptionalNonTradingDays = new ArrayList(); Init(); if (a is TradingDateTimeAxis) DoClone((TradingDateTimeAxis)a, this); else if (a is DateTimeAxis) DoClone((DateTimeAxis)a, this); else { DoClone(a, this); this.NumberFormat = null; } } /// <summary> /// Helper function for constructors. /// </summary> private void Init() { startTradingTime_ = 0; endTradingTime_ = TimeSpan.TicksPerDay; tradingTimeSpan_ = endTradingTime_ - startTradingTime_; virtualWorldMin_ = SparseWorldRemap(WorldMin); virtualWorldMax_ = SparseWorldRemap(WorldMax); } /// <summary> /// Deep copy of DateTimeAxis. /// </summary> /// <returns>A copy of the DateTimeAxis Class.</returns> public override object Clone() { TradingDateTimeAxis a = new TradingDateTimeAxis(); // ensure that this isn't being called on a derived type. If it is, then oh no! if (this.GetType() != a.GetType()) { throw new NPlotException( "Clone not defined in derived type. Help!" ); } DoClone( this, a ); return a; } /// <summary> /// Helper method for Clone. /// </summary> /// <param name="a">The cloned target object.</param> /// <param name="b">The cloned source object.</param> protected static void DoClone(TradingDateTimeAxis b, TradingDateTimeAxis a) { DateTimeAxis.DoClone(b, a); a.startTradingTime_ = b.startTradingTime_; a.endTradingTime_ = b.endTradingTime_; a.tradingTimeSpan_ = b.tradingTimeSpan_; a.WorldMin = b.WorldMin; a.WorldMax = b.WorldMax; a.exceptionalNonTradingDays = b.exceptionalNonTradingDays; } /// <summary> /// World to physical coordinate transform. /// </summary> /// <param name="coord">The coordinate value to transform.</param> /// <param name="physicalMin">The physical position corresponding to the world minimum of the axis.</param> /// <param name="physicalMax">The physical position corresponding to the world maximum of the axis.</param> /// <param name="clip">if false, then physical value may extend outside worldMin / worldMax. If true, the physical value returned will be clipped to physicalMin or physicalMax if it lies outside this range.</param> /// <returns>The transformed coordinates.</returns> /// <remarks>Not sure how much time is spent in this often called function. If it's lots, then /// worth optimizing (there is scope to do so).</remarks> public override PointF WorldToPhysical( double coord, PointF physicalMin, PointF physicalMax, bool clip) { // (1) account for reversed axis. Could be tricky and move // this out, but would be a little messy. PointF _physicalMin; PointF _physicalMax; if (this.Reversed) { _physicalMin = physicalMax; _physicalMax = physicalMin; } else { _physicalMin = physicalMin; _physicalMax = physicalMax; } // (2) if want clipped value, return extrema if outside range. if (clip) { if (WorldMin < WorldMax) { if (coord > WorldMax) { return _physicalMax; } if (coord < WorldMin) { return _physicalMin; } } else { if (coord < WorldMax) { return _physicalMax; } if (coord > WorldMin) { return _physicalMin; } } } // (3) we are inside range or don't want to clip. coord = SparseWorldRemap(coord); double range = virtualWorldMax_ - virtualWorldMin_; double prop = (double)((coord - virtualWorldMin_) / range); //double range = WorldMax - WorldMin; //double prop = (double)((coord - WorldMin) / range); //if (range1 != range) // range1 = range; // Force clipping at bounding box largeClip times that of real bounding box // anyway. This is effectively at infinity. const double largeClip = 100.0; if (prop > largeClip && clip) prop = largeClip; if (prop < -largeClip && clip) prop = -largeClip; if (range == 0) { if (coord >= virtualWorldMin_) prop = largeClip; if (coord < virtualWorldMin_) prop = -largeClip; } // calculate the physical coordinate. PointF offset = new PointF( (float)(prop * (_physicalMax.X - _physicalMin.X)), (float)(prop * (_physicalMax.Y - _physicalMin.Y))); return new PointF(_physicalMin.X + offset.X, _physicalMin.Y + offset.Y); } /// <summary> /// Transforms a physical coordinate to an axis world /// coordinate given the physical extremites of the axis. /// </summary> /// <param name="p">the point to convert</param> /// <param name="physicalMin">the physical minimum extremity of the axis</param> /// <param name="physicalMax">the physical maximum extremity of the axis</param> /// <param name="clip">whether or not to clip the world value to lie in the range of the axis if it is outside.</param> /// <returns></returns> public override double PhysicalToWorld( PointF p, PointF physicalMin, PointF physicalMax, bool clip) { // (1) account for reversed axis. Could be tricky and move // this out, but would be a little messy. PointF _physicalMin; PointF _physicalMax; if (this.Reversed) { _physicalMin = physicalMax; _physicalMax = physicalMin; } else { _physicalMin = physicalMin; _physicalMax = physicalMax; } // normalised axis dir vector float axis_X = _physicalMax.X - _physicalMin.X; float axis_Y = _physicalMax.Y - _physicalMin.Y; float len = (float)Math.Sqrt(axis_X * axis_X + axis_Y * axis_Y); axis_X /= len; axis_Y /= len; // point relative to axis physical minimum. PointF posRel = new PointF(p.X - _physicalMin.X, p.Y - _physicalMin.Y); // dist of point projection on axis, normalised. float prop = (axis_X * posRel.X + axis_Y * posRel.Y) / len; //double world = prop * (WorldMax - WorldMin) + WorldMin; double world = prop * (virtualWorldMax_ - virtualWorldMin_) + virtualWorldMin_; world = ReverseSparseWorldRemap(world); // if want clipped value, return extrema if outside range. if (clip) { world = Math.Max(world, WorldMin); world = Math.Min(world, WorldMax); } return world; } /// <summary> /// Remap a world coordinate into a "virtual" world, where non-trading dates and times are collapsed. /// </summary> /// <remarks> /// This code works under asumption that there are exactly 24*60*60 seconds in a day /// This is strictly speaking not correct but apparently .NET 2.0 does not count leap seconds. /// Luckilly, Ticks == 0 =~= 0001-01-01T00:00 =~= Monday /// First tried a version fully on floating point arithmetic, /// but failed hopelessly due to rounding errors. /// </remarks> /// <param name="coord">world coordinate to transform.</param> /// <returns>equivalent virtual world coordinate.</returns> protected double SparseWorldRemap(double coord) { long ticks = (long)coord; /* * removing non trading days.. * davide morelli * */ int numberOfDaysToRemove = 0; foreach (DateTime day in exceptionalNonTradingDays) { if (day.Ticks < ticks) numberOfDaysToRemove++; } long whole_days = ticks / TimeSpan.TicksPerDay; long ticks_in_last_day = ticks % TimeSpan.TicksPerDay; long full_weeks = whole_days / 7; long days_in_last_week = whole_days % 7; if (days_in_last_week >= 5) { days_in_last_week = 5; ticks_in_last_day = 0; } if (ticks_in_last_day < startTradingTime_) ticks_in_last_day = startTradingTime_; else if (ticks_in_last_day > endTradingTime_) ticks_in_last_day = endTradingTime_; ticks_in_last_day -= startTradingTime_; // removing non trading days... long whole_working_days = (full_weeks * 5 + days_in_last_week) - numberOfDaysToRemove; long working_ticks = whole_working_days * tradingTimeSpan_; long new_ticks = working_ticks + ticks_in_last_day; return (double)new_ticks; } /// <summary> /// Remaps a "virtual" world coordinates back to true world coordinates. /// </summary> /// <param name="coord">virtual world coordinate to transform.</param> /// <returns>equivalent world coordinate.</returns> protected double ReverseSparseWorldRemap(double coord) { long ticks = (long)coord; //ticks += startTradingTime_; /* * removing non trading days.. * davide morelli * */ int numberOfDaysToRemove = 0; foreach (DateTime day in exceptionalNonTradingDays) { if (SparseWorldRemap(day.Ticks) < ticks) numberOfDaysToRemove++; } ticks += numberOfDaysToRemove * tradingTimeSpan_; long ticks_in_last_day = ticks % tradingTimeSpan_; ticks /= tradingTimeSpan_; long full_weeks = ticks / 5; long week_part = ticks % 5; long day_ticks = (full_weeks * 7 + week_part) * TimeSpan.TicksPerDay; return (double)(day_ticks + ticks_in_last_day + startTradingTime_); } /// <summary> /// Adds a delta amount to the given world coordinate in such a way that /// all "sparse gaps" are skipped. In other words, the returned value is /// in delta distance from the given in the "virtual" world. /// </summary> /// <param name="coord">world coordinate to shift.</param> /// <param name="delta">shif amount in "virtual" units.</param> /// <returns></returns> public double SparseWorldAdd(double coord, double delta) { return ReverseSparseWorldRemap(SparseWorldRemap(coord) + delta); } /// <summary> /// World extent in virtual (sparse) units. /// </summary> public double SparseWorldLength { get { return SparseWorldRemap(WorldMax) - SparseWorldRemap(WorldMin); } } /// <summary> /// Check whether the given coordinate falls within defined trading hours. /// </summary> /// <param name="coord">world coordinate in ticks to check.</param> /// <returns>true if in trading hours, false if in non-trading gap.</returns> public bool WithinTradingHours(double coord) { long ticks = (long)coord; long whole_days = ticks / TimeSpan.TicksPerDay; long ticks_in_last_day = ticks % TimeSpan.TicksPerDay; long days_in_last_week = whole_days % 7; if (days_in_last_week >= 5) return false; if (ticks_in_last_day < startTradingTime_) return false; if (ticks_in_last_day >= endTradingTime_) return false; return true; } /// <summary> /// Check whether the given coordinate falls on trading days. /// </summary> /// <param name="coord">world coordinate in ticks to check.</param> /// <returns>true if on Mon - Fri.</returns> public bool OnTradingDays(double coord) { long ticks = (long)coord; long whole_days = ticks / TimeSpan.TicksPerDay; long days_in_last_week = whole_days % 7; return (days_in_last_week < 5); } /// <summary> /// Determines the positions of all Large and Small ticks. /// </summary> /// <remarks> /// The method WorldTickPositions_FirstPass() from the base works just fine, except that it /// does not account for non-trading gaps in time, therefore, when less than two days are visible /// an own algorithm is used (to show intraday time). Otherwise the base class implementation is used /// but the output is corrected to remove ticks on non-trading days (Sat, Sun). /// </remarks> /// <param name="physicalMin">The physical position corresponding to the world minimum of the axis.</param> /// <param name="physicalMax">The physical position corresponding to the world maximum of the axis.</param> /// <param name="largeTickPositions">ArrayList containing the positions of the large ticks.</param> /// <param name="smallTickPositions">null</param> internal override void WorldTickPositions_FirstPass( Point physicalMin, Point physicalMax, out ArrayList largeTickPositions, out ArrayList smallTickPositions ) { if (LargeTickStep != TimeSpan.Zero || SparseWorldLength > 2.0 * (double)tradingTimeSpan_) // utilise base class { ArrayList largeTickPositions_FirstPass; base.WorldTickPositions_FirstPass(physicalMin, physicalMax, out largeTickPositions_FirstPass, out smallTickPositions); if (largeTickPositions_FirstPass.Count < 2) { // leave it alone, whatever that single tick may be (better something than nothing...) largeTickPositions = largeTickPositions_FirstPass; } else if ((double)largeTickPositions_FirstPass[1] - (double)largeTickPositions_FirstPass[0] > 27.0 * (double)TimeSpan.TicksPerDay) { // For distances between ticks in months or longer, just accept all ticks largeTickPositions = largeTickPositions_FirstPass; } else { // for daily ticks, ignore non-trading hours but obey (skip) non-trading days largeTickPositions = new ArrayList(); foreach (object tick in largeTickPositions_FirstPass) { if (OnTradingDays((double)tick)) largeTickPositions.Add(tick); } } } else // intraday ticks, own algorithm { smallTickPositions = null; largeTickPositions = new ArrayList(); TimeSpan timeLength = new TimeSpan((long)SparseWorldLength); DateTime worldMinDate = new DateTime( (long)this.WorldMin ); DateTime worldMaxDate = new DateTime( (long)this.WorldMax ); DateTime currentTickDate; long skip; // in time ticks // The following if-else flow establishes currentTickDate to the beginning of series // and skip to the optimal distance between ticks // if less than 10 minutes, then large ticks on second spacings. if ( timeLength < new TimeSpan(0,0,10,0,0) ) { this.LargeTickLabelType_ = LargeTickLabelType.hourMinuteSeconds; int secondsSkip; if (timeLength < new TimeSpan( 0,0,0,10,0 ) ) secondsSkip = 1; else if ( timeLength < new TimeSpan(0,0,0,20,0) ) secondsSkip = 2; else if ( timeLength < new TimeSpan(0,0,0,50,0) ) secondsSkip = 5; else if ( timeLength < new TimeSpan(0,0,2,30,0) ) secondsSkip = 15; else secondsSkip = 30; int second = worldMinDate.Second; second -= second % secondsSkip; currentTickDate = new DateTime( worldMinDate.Year, worldMinDate.Month, worldMinDate.Day, worldMinDate.Hour, worldMinDate.Minute, second,0 ); skip = secondsSkip * TimeSpan.TicksPerSecond; } // Less than 2 hours, then large ticks on minute spacings. else if ( timeLength < new TimeSpan(0,2,0,0,0) ) { this.LargeTickLabelType_ = LargeTickLabelType.hourMinute; int minuteSkip; if ( timeLength < new TimeSpan(0,0,10,0,0) ) minuteSkip = 1; else if ( timeLength < new TimeSpan(0,0,20,0,0) ) minuteSkip = 2; else if ( timeLength < new TimeSpan(0,0,50,0,0) ) minuteSkip = 5; else if ( timeLength < new TimeSpan(0,2,30,0,0) ) minuteSkip = 15; else //( timeLength < new TimeSpan( 0,5,0,0,0) ) minuteSkip = 30; int minute = worldMinDate.Minute; minute -= minute % minuteSkip; currentTickDate = new DateTime( worldMinDate.Year, worldMinDate.Month, worldMinDate.Day, worldMinDate.Hour, minute,0,0 ); skip = minuteSkip * TimeSpan.TicksPerMinute; } // Else large ticks on hour spacings. else { this.LargeTickLabelType_ = LargeTickLabelType.hourMinute; int hourSkip; if (timeLength < new TimeSpan(0, 10, 0, 0, 0)) hourSkip = 1; else if (timeLength < new TimeSpan(0, 20, 0, 0, 0)) hourSkip = 2; else hourSkip = 6; int hour = worldMinDate.Hour; hour -= hour % hourSkip; currentTickDate = new DateTime( worldMinDate.Year, worldMinDate.Month, worldMinDate.Day, hour, 0, 0, 0); skip = hourSkip * TimeSpan.TicksPerHour; } // place ticks while (currentTickDate < worldMaxDate) { double world = (double)currentTickDate.Ticks; if (!WithinTradingHours(world)) { // add gap boundary instead world = ReverseSparseWorldRemap(SparseWorldRemap(world)); // moves forward long gap = (long)world; gap -= gap % skip; currentTickDate = new DateTime(gap); } if (world >= this.WorldMin && world <= this.WorldMax) { largeTickPositions.Add(world); } currentTickDate = currentTickDate.AddTicks(skip); } } } /// <summary> /// Get an appropriate label name, given the DateTime of a label /// </summary> /// <param name="tickDate">the DateTime to get the label name for</param> /// <returns>A label name appropriate to the supplied DateTime.</returns> protected override string LargeTickLabel(DateTime tickDate) { string label; if ( this.NumberFormat == null && (LargeTickLabelType_ == LargeTickLabelType.hourMinute || LargeTickLabelType_ == LargeTickLabelType.hourMinuteSeconds) && tickDate.TimeOfDay == StartTradingTime) { // in such case always show the day date label = (tickDate.Day).ToString(); label += " "; label += tickDate.ToString("MMM"); } else { label = base.LargeTickLabel(tickDate); } return label; } } } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821571&aid=1709964&group_id=161868 |
From: Warren C. <the...@op...> - 2007-11-18 14:50:38
|
There seems to be no way to get LabelPointPlot to work in NPlot.Bitmap.PlotSurface2D. Every attempt I make results in a completely different exception being thrown either upon adding the LabelPointPlot to the graph or upon calling refresh(). For example: NPlot.LabelPointPlot lpp = new LabelPointPlot(); lpp.DataSource = xPositions; //an int[] lpp.OrdinateData = yPositions; //an int[] lpp.TextData = labels;//an string[] lpp.AbscissaData = XAxis; //an int[] graph.Add(lpp); Am I doing something wrong or is this a bug? |
From: SourceForge.net <no...@so...> - 2007-11-08 15:43:21
|
Bugs item #1828254, was opened at 2007-11-08 07:45 Message generated for change (Comment added) made by jamcquay You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821568&aid=1828254&group_id=161868 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: 0.9.10.0 >Status: Closed >Resolution: Duplicate Priority: 5 Private: No Submitted By: Oleg Lukyanenko (olexsf) Assigned to: Jamie McQuay (jamcquay) Summary: PlotSurface2D.UpdateAxes doesn't work properly Initial Comment: PlotSurface2D.UpdateAxes method sets world extent from one IPlot only. I think, the problem is in PlotSurface2D.cs file: lines 600-601 should be IPlot p = (IPlot)drawables_[i]; XAxisPosition xap = (XAxisPosition)xAxisPositions_[i]; YAxisPosition yap = (YAxisPosition)yAxisPositions_[i]; (using `i` index instead `position`) ---------------------------------------------------------------------- >Comment By: Jamie McQuay (jamcquay) Date: 2007-11-08 10:43 Message: Logged In: YES user_id=613279 Originator: NO Thank you for your bug report. This bud has already been reported and it is fixed in the trunk version of NPlot. This duplicates Bug#1671259. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821568&aid=1828254&group_id=161868 |
From: SourceForge.net <no...@so...> - 2007-11-08 15:41:43
|
Bugs item #1828254, was opened at 2007-11-08 07:45 Message generated for change (Settings changed) made by jamcquay You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821568&aid=1828254&group_id=161868 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: 0.9.10.0 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Oleg Lukyanenko (olexsf) >Assigned to: Jamie McQuay (jamcquay) Summary: PlotSurface2D.UpdateAxes doesn't work properly Initial Comment: PlotSurface2D.UpdateAxes method sets world extent from one IPlot only. I think, the problem is in PlotSurface2D.cs file: lines 600-601 should be IPlot p = (IPlot)drawables_[i]; XAxisPosition xap = (XAxisPosition)xAxisPositions_[i]; YAxisPosition yap = (YAxisPosition)yAxisPositions_[i]; (using `i` index instead `position`) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821568&aid=1828254&group_id=161868 |
From: SourceForge.net <no...@so...> - 2007-11-08 12:45:54
|
Bugs item #1828254, was opened at 2007-11-08 14:45 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821568&aid=1828254&group_id=161868 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: 0.9.10.0 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Oleg Lukyanenko (olexsf) Assigned to: Nobody/Anonymous (nobody) Summary: PlotSurface2D.UpdateAxes doesn't work properly Initial Comment: PlotSurface2D.UpdateAxes method sets world extent from one IPlot only. I think, the problem is in PlotSurface2D.cs file: lines 600-601 should be IPlot p = (IPlot)drawables_[i]; XAxisPosition xap = (XAxisPosition)xAxisPositions_[i]; YAxisPosition yap = (YAxisPosition)yAxisPositions_[i]; (using `i` index instead `position`) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821568&aid=1828254&group_id=161868 |
From: SourceForge.net <no...@so...> - 2007-10-04 10:52:39
|
Patches item #1806859, was opened at 2007-10-03 12:30 Message generated for change (Comment added) made by anmar You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821570&aid=1806859&group_id=161868 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Eyal (eyal0) >Assigned to: Angel Marin (anmar) Summary: CandlePlot should use ILists, not Arrays Initial Comment: The IList is a parent class of the Array. LinePlot expects input data to be IList, but CandlePlot uses Array. I fixed this in the patch below. Also edited the text of some exceptions to be more accurate. ---------------------------------------------------------------------- >Comment By: Angel Marin (anmar) Date: 2007-10-04 12:52 Message: Logged In: YES user_id=627967 Originator: NO Patch applied to trunk (r31) with slight modification thanks! It should be in tomorrow's automatic build. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821570&aid=1806859&group_id=161868 |