All I can tell you again is that the auto range determination works as expected in most cases. There are a few cases where it doesn´t or may not do.
- As described in the link above, Double.NaN values might cause problems if the DomainOrder for the XYDataset is NOT DomainOrder.NONE. The DomainOrder for an XYSeriesColelction is dependent on whether the autoSort feature of the XYSeries is used or not. By default, the autoSort is used, unless you use the XYSeries conctructor XYSeries(java.lang.Comparable key, boolean autoSort) and set the autoSort to false.
- Identical series names can cause problems, as described
here. I have already suggested to change that and see whether that makes a difference. Have you followed that suggestion?
In your last post, you have brought up some more potential sources of unexpected behaviour.
- Now you mention that you are getting the values from your "hardware"? What kind of hardware are we talking about? How are you retrieving the data? Are you 100 % sure that the data points that you are getting from the hardware are all > 0? You still haven´t explained how you check your values.
- Are we talking about a real time plot? And if we do, what is the update frequency? Maybe we are seeing some kind of threading issue?
- If we are talking about a real time plot: where is the "time information" shown on the plot ? In your screenshot, I am just seeing two axis with what looks like signal information, one measured, one calculated.
- You are absolutely right that I have not understood the purpose of the black series. As explained above, you have mentioned that "the black dot serie is a clone of the red line serie." Do you agree that, if that statement is true, the black dot series and the red line should have the same number of datapoints?
Jorne wrote:But the only thing your telling me is saying what could be the problem. But i need a solution to solve this problem.
Do you really believe that anybody will be able to locate the exact source of the problem, based on the informations that you have given so far, and based on the 5 lines of code in your first post?