Skip to content

Combine markers with error bars (markers = data) with line (= model prediction) #289

@seppro

Description

@seppro

It is common in technical and natural sciences to have measured data with errors and model which approximates them, see eg:

https://upload.wikimedia.org/wikipedia/commons/f/f4/Time_profile_of_the_774_AD_spike_in_C-14..jpg

Both, error bars and line chart are "XYChart", but there is a global setting which switches between markers and lines (as far as I understand) :

chart.getStyler().setDefaultSeriesRenderStyle(XYSeries.XYSeriesRenderStyle.Scatter);

or

chart.getStyler().setDefaultSeriesRenderStyle(XYSeries.XYSeriesRenderStyle.Line);

I cannot get it run correctly, if I do not print "line" data at all, then marker-data are OK. However if code contains "XYSeriesRenderStyle.Line" then two lines appear: markers are connected with line (this is unwanted) and also "line-data" are displayed (which is fine).

Is it possible to display markes (not connected with line, with error bars), and a line (second data sample, not going throug markers)?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions