Re: some questions about error bars and other plot objects
- From: Jody Goldberg <jody gnome org>
- To: Jean Br?fort <jean brefort ac-dijon fr>
- Cc: "gnumeric-list gnome org" <gnumeric-list gnome org>
- Subject: Re: some questions about error bars and other plot objects
- Date: Mon, 9 Feb 2004 14:52:32 -0500
On Mon, Feb 09, 2004 at 05:47:10PM +0100, Jean Brefort wrote:
Hi,
I have written some code to implement error bars in libgoffice, but I
would like to discuss some options before going further.
First of all, error bars concern several plot types, so I suppose the
best place to implement them is in GogSeries. I think we can have a
field in GogSeriesDesc which can take one of the following values:
GOG_ERROR_BARS_NONE,
GOG_ERROR_BARS_VERT,
GOG_ERROR_BARS_HORIZ,
GOG_ERROR_BARS_BOTH
and in GogSeries pointers to the appropriate number of GogErrorBar
structures (or should every thing be directly in GogSeries?).
hmm, a few suggestions
1) Avoid using HORIZ/VERT they won't apply nicely for column plot vs
bar plot. Instead we should probably just tag it to the GOG_DIM_VALUE
dimensions (eg x and y for scatter, but only value for bar/col)
So a GogSeriesDimDesc would get an extra flag member to store the
allowable types of errors.
2) My gut was to have 3 possibilites
- no error allowed (pie)
- 1 error for the value (eg a point centered at x with error +- foo)
- 2 errors for the value (eg a point at x with +foo -bar
XL seems to use different semantics
- enable plus
- enable minus
So you have have a constant value in one or both directions, but
would need custom to do something different for positive and
negative.
As always we're probably better off matching the Xl semantics to
simplify import. The loss of a simple way to say 'value +3 or -4'
seems small.
3) I'm not at all clear where to have the object itself live. XL
seems to define them as distinct objects, children of the plot.
However, we don't really have the infrastructure to handle
looking up the location of a point from a different view. So I'm
leaning towards a library of utility routines that would be
called by each plot. There aren't too many of them so it won't
be too bad.
Concerning the options for error bars, I studied what Excel and OpenCalc
do. They behave quite differently and I do not understand all options
(in Excel, I could not understand what "standard error" is and how to
calculate the length of the bars). At first, I'll implement constant
absolute and relative (%) errors which do not need statistical
functions. Comments?
Simple seems like the best idea for now.
Some plots need two styles, one for positive values and the other for
negative ones (bubble plots and some financial plots). I do not know how
to implement that since GogStyledObject contains only one style.
I'm not sure how styles fit into this. The type of error bar
doesn't fit into style all that well. We're not going to theme
them.
Thanks for looking into this. I'll muddy the waters shortly when I
add the GogAxis::map support (to add inverted and log type mapping)
but hopefully not too badly.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]