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 |