Revision: 8
http://svn.sourceforge.net/nplot/?rev=8&view=rev
Author: jamcquay
Date: 2006-11-11 08:36:57 -0800 (Sat, 11 Nov 2006)
Log Message:
-----------
Fixed [SF bug 1584460]
When x-axis has a span of 0 units the plot was not being displayed correctly.
This fix assigns a minimum span value in the case where the actual span is 0.
Code fixed by: jamcquay
Signed off by: jamcquay
Modified Paths:
--------------
trunk/src/SequenceAdapter.cs
Modified: trunk/src/SequenceAdapter.cs
===================================================================
--- trunk/src/SequenceAdapter.cs 2006-11-11 12:35:24 UTC (rev 7)
+++ trunk/src/SequenceAdapter.cs 2006-11-11 16:36:57 UTC (rev 8)
@@ -268,7 +268,17 @@
/// <returns>A suitable x-axis.</returns>
public Axis SuggestXAxis()
{
- return this.XAxisSuggester_.Get();
+ 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)
+ {
+ // TODO make 0.08 a parameter.
+ a.IncreaseRange(0.08);
+ }
+ return a;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|