No, they happened when I tried to plot the chart. I couldn't figure out how to implement the auto-scaling transformation from the demo. For example, I see catTAuto listed as a transformation in the object inspector and listed as a property in the axisdemo main.pas, but cannot find any code to implement it there. I do see it mentioned in main.lfm, but don't understand how it works -- it seems to list properties for the transform more than anything else.

In any event, for consistency's sake I need to maintain axes of -90 C to 60 C for the temperature axis, and 0 cm to 300 cm for the precipitation axis. Since I plot up to three temperature series, it's easier to set that as fixed and figure out how to transform the precipitation axis.

You seem to have a lot invested in the idea that flexible transformations are best from a coding standpoint, but the hundreds of charts I plot have to be plotted consistently -- there can be no individualized scaling. The bars on a graph from a site with a maximum monthly precipitation of 20 cm need to be one-tenth as tall as the bars from a site with maximum monthly precipitation of 200 cm. I am not just comparing the bars and lines on an individual chart, I am comparing one chart to similar charts from hundreds of sites around the world. That way I and others can tell the chart from a desert site, for example, from that of a tropical rainforest site or monsoon forest site. From that standpoint, being able to independently set max and min values for each vertical axis would be a lot better.

Since I am not sure this list accepts attachments, I will send you charts from two sites offlist for you to better see what I mean.

Thanks again for your time.

Sincerely,

Dave Lawrence

On 7/28/2011 11:50 PM, Alexander Klenin wrote:
On Fri, Jul 29, 2011 at 01:04, David M. Lawrence<d...@fuzzo.com>  wrote:
I have tried to deconstruct the code in the demo, but cannot understand it
works, and my efforts to copy the code end in unspecified access violations.
What do you mean by "unspecified"? Did they happen inside TAChart code?
If so, can you post a tracebacks?

In any event, I cannot set up simple multipiers like you have in the sample
-- I have a database with hundreds of climate data files, and with new
climate normals being released, would like to add hundreds more.  Each data
set would have to be transformed individually.
Are you talking about the linear transformation?
Well, you could write a loop finding min/man data value, and
recalculate scale accordingly.
However, auto-scaling transformation does this for you.

It might be more helpful to be able to set max and min values in
TUserDefinedChartSource -- you have that capability in TRandomChartSource
(that much I did understand from the axis demo).
Those serve completely different purpose.
TRandomChartSource _generates_ data in the given range.
Depending in the random seed, actual range between minimum and maximum
generated values
may be smaller then one given by the properties.
Actual range is always calculated based on the data, including
TUserDefinedChartSource,
so there is no need to set it explicitly.

Anyway, it seems that it is really time to start writing some documentation.
I just did that -- see http://wiki.lazarus.freepascal.org/TAChart_documentation
Hope that clarifies things.


--
------------------------------------------------------
 David M. Lawrence        | Home:  (804) 559-9786
 7471 Brook Way Court     | Fax:   (804) 559-9787
 Mechanicsville, VA 23111 | Email: d...@fuzzo.com
 USA                      | http:  http://fuzzo.com
------------------------------------------------------

"All drains lead to the ocean."  -- Gill, Finding Nemo

"We have met the enemy and he is us."  -- Pogo

"No trespassing
 4/17 of a haiku"  --  Richard Brautigan


--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to