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