Status & Roadmap
Authors & License
Funding Ultimate++
Search on this site
Search in forums

SourceForge.net Logo
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 Go to next message
Maginor is currently offline  Maginor
Messages: 44
Registered: May 2019
Edit: This is resolved in an upcoming version.

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.

Digging into it a bit, I found that this change is caused by the new
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 Go to previous message
koldo is currently offline  koldo
Messages: 3299
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
Previous Topic: Labels Underneath X Axis
Goto Forum:

Current Time: Mon Jun 05 09:39:00 CEST 2023

Total time taken to generate the page: 0.01527 seconds