Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
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
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 Go to previous messageGo to next message
koldo is currently offline  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

index.php?t=getfile&id=6788&private=0

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
Re: (RESOLVED) Line drawn across Null values [message #59947 is a reply to message #59714] Fri, 09 June 2023 22:44 Go to previous message
koldo is currently offline  koldo
Messages: 3394
Registered: August 2008
Senior Veteran
Well, probably if either x or y are Null, it is better the plot will have a hole.
A WhenPainter() is also added.

index.php?t=getfile&id=6816&private=0


Best regards
Iñaki
Previous Topic: Labels Underneath X Axis
Next Topic: Scatter Control
Goto Forum:
  


Current Time: Fri Oct 11 04:55:43 CEST 2024

Total time taken to generate the page: 0.03077 seconds