Open the window and run the mainloop. This is blocking, due to the mainloop.
// Code to create the aes here // ... // Start gtk window. const width = 470; const height = 470; auto gd = new GTKWindow(); auto tid = new Thread(() { gd.run("plotcli", width, height); }).start(); auto gg = GGPlotD().put( geomHist2D( aes ) ); gd.draw( gg, width, height ); Thread.sleep( dur!("seconds")( 2 ) ); // sleep for 5 seconds gg = GGPlotD().put( geomPoint( aes ) ); gd.clearWindow(); gd.draw( gg, width, height ); // Wait for gtk thread to finish (Window closed) tid.join();
Helper class to open a GTK window and draw to it