Skip to content

Series Drawn Incorrectly #27

@timmolter

Description

@timmolter

I got this in an email today...

I was playing around with the new setX/YAxisMin/Max, and found some unexpected results, as show in these screenshots:

This shows two sets of data plotted on a log plot, with Xchart choosing the axis ranges:

double[] xData = new double[]{0.0, 1.0, 2.0, 3.0, 4.0 ,5,6};
double[] yData = new double[]{106, 44, 26,10, 7.5, 3.4,.88};
double[] yData2 = new double[]{102,49,23.6,11.3,5.4,2.6,1.25};
mychart.getStyleManager().setYAxisLogarithmic(true);

image002

For the plot below I set Y-axis range to 0.01 - 1000 in the code. The axes draw properly, but the data are misplaced:

mychart.getStyleManager().setYAxisLogarithmic(true);
mychart.getStyleManager().setYAxisMin(0.01);
mychart.getStyleManager().setYAxisMax(1000);

image001

Below are the same data, plotted with the x axis limits set to -5 and 10, again the axes are correct but the data misplaced:

mychart.getStyleManager().setXAxisMin(-5);
mychart.getStyleManager().setXAxisMax(10);

image003

Metadata

Metadata

Assignees

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