diff --git a/src/edif.cpp b/src/edif.cpp
index 67a8b80fb9bcb8556e22474cea171326c80fe698..9e43ab1d103386e7f01cb4ca022b391bf6803f1c 100644
--- a/src/edif.cpp
+++ b/src/edif.cpp
@@ -1130,6 +1130,10 @@ void NEdif::Plot( bool add )
                              e->P()->xco.str(), e->P()->yco.str(),
                              "curve file "+strg(k)+" scan "+strg(j) );
             } else if ( fc ) {
+                // improved line plotting:
+                // - stop/start line when leaving/reentering the frame
+                // - interpolate when crossing the horizontal border (TODO)
+                // - interpolate at discontinuities (TODO)
                 double x, y;
                 int npts = 100;
                 double delta0 = 1.0/(npts-1.e-10);
@@ -1150,10 +1154,9 @@ void NEdif::Plot( bool add )
                         goto incr_pos;
                     }
                     if( !was_inside ){
+                        // start new line segment
                         SS.push_back( CScan() );
                         s = &( SS[SS.size()-1] );
-                        *s = S;
-                        s->Clear();
                     }
                     s->push_back( x, y );
                 incr_pos: