[Freegis-list] owtchart snall numbers

Daniel Morissette dmorissette at dmsolutions.ca
Thu Feb 2 20:33:46 CET 2006


Tomas Zajc wrote:
> I'm trying to plot some data wit owtchart as Steve suggested me but I'm having 
> some problems plotting small numbers. In first place I couldn't find the way 
> to make the cgi read scientific notated data, so I had to regenerate my 
> shapefiles. Once I got them written in normal notation I found that I 
> couldn't plot small numbers as small as  -0.00000000164566937855 is this a 
> common limitation? The url I'm sending is:
> 
> http://localhost/cgi-bin/owtchart?Type=Line&W=300&H=200&NumSets=1&NumPts=31&Vals=0.00000000000000000000!0.00000000000000000000!0.00000000000000000000!0.00000000000000000000!0.00000000000000000000!-0.00000000164566937855!0.00000000024503654661!-0.00000000007510970318!0.00000000055291687895!0.00000000050531184792!0.00000000002954476941!0.00000000050230053450!0.00000000013284597034!0.00000000040191416861!-0.00000000050866350021!0.00000000020380243326!-0.00000000019812386454!-0.00000000044895726026!0.00000000087982593433!-0.00000000000214305635!0.00000000191609705880!-0.00000000056374438451!0.00000000077850459412!-0.00000000094573238130!-0.00000000024245977448!0.00000000378907261123!0.00000000258610421966!0.00000000457244464513!0.00000000351854634317!0.00000000091475138575!0.00000000040152881020
> 

OWTChart, or more specifically the GDChart lib that's under the hood, 
has an internal array of possible/nice values to use as y axis intervals 
that range from 1/64 to 10000000. The range of values that you have in 
your case is much smaller than 1/64 (0.015625), that's why you get that 
kind of result.

I didn't try myself, but I think you should be able to solve this by 
editing gdchart2/gdchart.c, look for the ypoints[] array around line 920 
and add more smaller range values that suit your needs.

Daniel
-- 
------------------------------------------------------------
  Daniel Morissette               dmorissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------




More information about the Freegis-list mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)