Example simleplot.
Modify points (2 and 3 set value to NAN).
points << QPointF( 0.0, 4.4 ) << QPointF( 1.0, 3.0 )
<< QPointF( 2.0, NAN ) << QPointF( 3.0, NAN )
<< QPointF( 4.0, 7.9 ) << QPointF( 5.0, 7.1 );
I have very strange curve (lines going to the upper left corner. ).
broken_NAN_set_pen4.png

If set pen width to 1 - the line looks right.
broken_NAN_set_pen1.png
how to make the line correct for a different pen width (as with thickness 1 )?