ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Error Bars with a scatter layer
Posted by Dermot on Nov-08-2019 00:13
Hi,

Trying to add error bars to a scatter data set.
Looking at the example 'Line with Error Symbols', this does not specify an x series.
Assumes the x-data is regularly spaced [0,1,2,3,4......]

My x data is irregular [-100, -50, -25, 0, 25, 50, 100].
Can I use the BoxWhisker layer for this, how do I specify the x data.

Thanks.

  Re: Error Bars with a scatter layer
Posted by Peter Kwan on Nov-08-2019 02:52
Hi Dermot,

You can use Layer.setXData to specify the x-data. It is like:

BoxWhiskerLayer layer = c.addBoxWhiskerLayer(....);
layer.setXData(myXData);

You probably would also like to specify the width of your error bar. For example, if your x-coordinates are:

x = { -100, -12, 33, 5, 65, -62 };

then it is hard to know how wide should the error bar be. The error bar width can be specify by using one of the following methods:

https://www.advsofteng.com/doc/cdnet.htm#BaseBoxLayer.setDataGap.htm

https://www.advsofteng.com/doc/cdnet.htm#BaseBoxLayer.setDataWidth.htm


Hope this can help.

Regards
Peter Kwan


hausfrauen porno tube