BookmarkSubscribeRSS Feed
tc
Lapis Lazuli | Level 10 tc
Lapis Lazuli | Level 10

SasOdsGraphicsTwitterX.png

 

SAS ODS Graphics code to generate the new Twitter X logo. Used Microsoft Paint to grab the x/y vertex points for the polygons from image accompanying Elon Musk just changed Twitter's logo again article in The Verge.

 

* Fun With SAS ODS Graphics: 3-Polygon Twitter X Logo;

data twitterXlogo;                   /* Generate 4 pairs of x,y points for 3 polygons */ 
infile datalines dlm=', ';           /* 1 = White line lower left to upper right */ 
input x y@@;                         /* 2 = White outline lower right to upper left */ 
id=floor((_n_-1)/4)+1;               /* 3 = Blue fill line lower right to upper left */ 
datalines;                           
0,0 540,620 590,620 50,0
435,0 0,620 185,620 620,0
460,35 70,585 160,585 550,35
;                                    /* Plot polygons against Twitter blue background */
ods graphics / reset antialias border=off width=6.2in height=6.2in;
proc sgplot aspect=1 pad=0 nowall noborder noautolegend;
styleattrs backcolor=cX1DA1F2 datacolors=(white white cX1DA1F2);
polygon x=x y=y id=id / group=id nooutline fill;
xaxis display=none offsetmin=.1 offsetmax=.1; 
yaxis display=none offsetmin=.1 offsetmax=.1; 
run;

 

USING PAINT TO GRAB POLYGON VERTEX POINTS

PaintTwitterX.jpg

 

 

 

 

1 REPLY 1
ChrisHemedinger
Community Manager

Cool take on this! Now can you make it flash at a bazillion lumens like the real thing?

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1225 views
  • 5 likes
  • 2 in conversation