Hey Richard.I saw this back in May with data that can have negative numbers, but is still better to visualize on a log scale. The ExtremesIterator class, tasked with finding the data's min and max, needs to ignore values at or below 0.0. The bad_alloc is because it runs out of memory trying to allocate an asymptotic axis. The change I made alters the iterator to ignore such values in finding the minimum for LogScale. With my data, the new minimum is still close to 0, and determined by the precision of the data itself, so I find it acceptable.
I think the crash is a bug in Wt, since visualizing a data model shouldn't require directly altering the underlying data.
Attached is my change, which also improves the rendered extent padding to be a small amount in the proper scale.
I hope this helps. Cheers. -- Joe Garcia Instrumentation Technologist UW Lidar Group University of Wisconsin - Madison
logaxis_minAbove0.patch
Description: Binary data
On Jul 14, 2009, at 1:09 PM, Richard Ulrich wrote:
Hi everybody,I paint some charts from timing measures that sometimes contain gaps orthe measured times were below the threshold and thus 0.0. As long as I use linear scales, everything is fine, but when I use logarithmic scales I often get std::bad_alloc because inWAxis::getLabelTicks() the ticks vector gets filled as long as there ismemory available. I solved the issue for now by filling the gaps and replacing the zero values with something very small like 0.00001 in the StandardItemModel before passing to the chart. Is this the standard procedure, or would it make sense to handle such inputs in the WAxis? Rgds Richard ------------------------------------------------------------------------------ Enter the BlackBerry Developer ChallengeThis is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prizedetails at: http://p.sf.net/sfu/Challenge _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge
_______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
