// Drawing different shapes
import ggplotd.aes : aes, Pixel;
import ggplotd.axes : xaxisRange, yaxisRange;
import ggplotd.geom : geomDiamond, geomRectangle;
auto gg = GGPlotD();
auto aes1 = [aes!("x", "y", "width", "height")(1.0, -1.0, 3.0, 5.0)];
gg.put( geomDiamond( aes1 ) );
gg.put( geomRectangle( aes1 ) );
gg.put( xaxisRange( -5, 11.0 ) );
gg.put( yaxisRange( -9, 9.0 ) );
auto aes2 = [aes!("x", "y", "width", "height")(8.0, 5.0, Pixel(10), Pixel(20))];
gg.put( geomDiamond( aes2 ) );
gg.put( geomRectangle( aes2 ) );
auto aes3 = [aes!("x", "y", "width", "height")(6.0, -5.0, Pixel(25), Pixel(25))];
gg.put( geomDiamond( aes3 ) );
gg.put( geomRectangle( aes3 ) );
gg.save( "shapes1.png", 300, 300 );
// Drawing different shapes
import ggplotd.aes : aes, Pixel;
import ggplotd.axes : xaxisRange, yaxisRange;
import ggplotd.geom : geomEllipse, geomTriangle;
auto gg = GGPlotD();
auto aes1 = [aes!("x", "y", "width", "height")( 1.0, -1.0, 3.0, 5.0 )];
gg.put( geomEllipse( aes1 ) );
gg.put( geomTriangle( aes1 ) );
gg.put( xaxisRange( -5, 11.0 ) );
gg.put( yaxisRange( -9, 9.0 ) );
auto aes2 = [aes!("x", "y", "width", "height")(8.0, 5.0, Pixel(10), Pixel(20))];
gg.put( geomEllipse( aes2 ) );
gg.put( geomTriangle( aes2 ) );
auto aes3 = [aes!("x", "y", "width", "height")( 6.0, -5.0, Pixel(25), Pixel(25))];
gg.put( geomEllipse( aes3 ) );
gg.put( geomTriangle( aes3 ) );
gg.save( "shapes2.png", 300, 300 );