Home » U++ Library support » ScatterDraw & ScatterCtrl » (RESOLVED) Line drawn across Null values
(RESOLVED) Line drawn across Null values [message #59710] |
Wed, 15 March 2023 13:54 |
Maginor
Messages: 44 Registered: May 2019
|
Member |
|
|
Edit: This is resolved in an upcoming version.
Hi,
It used to be so that if a line plot has a Null data value in it, it would have a gap at that value.
Now this has been changed so that it draws a line from the last valid value to the next one.
If this change is intentional, I would prefer it to be configurable so that I can still get the old behaviour.
Edit:
Digging into it a bit, I found that this change is caused by the new
DataAddPoints
function which extracts the points from the data source into a Vector<Point>. It has been coded so that it just skips values where !IsNum(yy).
I guess this is a nice optimization unless you actually want it to have holes at Null values, which was how it worked before intentionally.
Unfortunately, I am not able to fix it just by removing the condition IsNum(yy), because it produces an incorrect plot, so I am not entirely sure what is going on.
[Updated on: Thu, 16 March 2023 10:14] Report message to a moderator
|
|
|
Re: (RESOLVED) Line drawn across Null values [message #59714 is a reply to message #59710] |
Sun, 19 March 2023 12:43 |
|
koldo
Messages: 3394 Registered: August 2008
|
Senior Veteran |
|
|
I am not totally sure about the best behaviour. If you run ScatterDraw_demo_cl, you will get from this vector
s1 = {{1,14}, {2,65}, {3,29}, {Null,Null}, {5,40}, {6,50}, {7,Null}, {8,25}, {9,10}};
this plot
If x == y == Null, plot line jumps, but if just y == Null, a hole is created.
What would be the best behaviour?
Best regards
Iñaki
|
|
|
|
Goto Forum:
Current Time: Fri Oct 11 04:55:43 CEST 2024
Total time taken to generate the page: 0.03077 seconds
|