节日快乐
DATA _NULL_;
/*Initialize DSGI*/
RC = GINIT ();
/*Open a graphic segment*/
RC = GRAPH ('CLEAR');
/*Assign color, Yellow, to 1*/
RC = GSET ('COLREP', 1, 'RED');
/*Assign color, Blue, to 2*/
RC = GSET ('COLREP', 2, 'YELLOW');
/*Fill-in area with No. 2 color, Blue*/
RC = GSET ('FILCOLOR', 2);
/*Fill-in type is Solid*/
RC = GSET ('FILTYPE', 'SOLID');
/*Draw a Solid Blue circle, from 0 to 360 degree at coordinate (72, 50) with
semi-diameter = 50*/
RC = GDRAW ('PIE', 65, 50, 50, 0, 360);
/*Set up text color as Yellow*/
RC = GSET ('TEXCOLOR', 1);
/*Set up text height is 10 unit*/
RC = GSET ('TEXHEIGHT', 10);
/*Set up text font as Swiss Bold*/
RC = GSET('TEXFONT', ' ZAPFBI');
/*Write down text, “HAVE A GOOD HOLIDAY?” starting from coordinate, (21, 45)*/
RC = GDRAW ('TEXT', 30, 45, 'HAVE A GOOD HOLIDAY!');
/*Close the graphics segment*/
RC = GRAPH ('UPDATE');
/*Terminate DSGI*/
RC = GTERM ();
RUN; /*Display output*/
代码摘自:
《Making Presentations More Fun with DATA Step Graphics Interface (DSGI) 》