04-28-2022
marked
Fluorite | Level 6
Member since
12-14-2015
- 3 Posts
- 3 Likes Given
- 0 Solutions
- 10 Likes Received
-
Latest posts by marked
Subject Views Posted 1408 04-29-2022 01:26 AM 1420 04-28-2022 07:57 PM 2670 07-29-2017 11:27 AM -
Activity Feed for marked
- Got a Like for Re: How to color cells in SAS data table. 04-29-2022 07:49 AM
- Posted Re: How to color cells in SAS data table on SAS Programming. 04-29-2022 01:26 AM
- Posted Re: How to color cells in SAS data table on SAS Programming. 04-28-2022 07:57 PM
- Got a Like for Re: Fun With SAS ODS Graphics: Betsy Ross Edition. 08-17-2017 08:18 AM
- Liked Re: Fun With SAS ODS Graphics: Betsy Ross Edition for ChrisHemedinger. 08-13-2017 06:56 PM
- Got a Like for Re: Fun With SAS ODS Graphics: Betsy Ross Edition. 08-11-2017 06:08 AM
- Got a Like for Re: Fun With SAS ODS Graphics: Betsy Ross Edition. 08-08-2017 02:39 AM
- Got a Like for Re: Fun With SAS ODS Graphics: Betsy Ross Edition. 08-04-2017 07:25 AM
- Got a Like for Re: Fun With SAS ODS Graphics: Betsy Ross Edition. 07-31-2017 08:23 AM
- Got a Like for Re: Fun With SAS ODS Graphics: Betsy Ross Edition. 07-30-2017 10:24 PM
- Got a Like for Re: Fun With SAS ODS Graphics: Betsy Ross Edition. 07-29-2017 09:18 PM
- Liked Re: Fun With SAS ODS Graphics: Betsy Ross Edition for pinkY2229. 07-29-2017 08:15 PM
- Liked Fun With SAS ODS Graphics: Betsy Ross Edition for tc. 07-29-2017 08:12 PM
- Got a Like for Re: Fun With SAS ODS Graphics: Betsy Ross Edition. 07-29-2017 01:04 PM
- Got a Like for Re: Fun With SAS ODS Graphics: Betsy Ross Edition. 07-29-2017 11:31 AM
- Posted Re: Fun With SAS ODS Graphics: Betsy Ross Edition on Graphics Programming. 07-29-2017 11:27 AM
-
Posts I Liked
Subject Likes Author Latest Post 4 4 14 -
My Liked Posts
Subject Likes Posted 1 04-28-2022 07:57 PM 9 07-29-2017 11:27 AM
04-29-2022
01:26 AM
Yes, I agree. That's why I made the comment that I was unsure of OP's intent.
... View more
04-28-2022
07:57 PM
1 Like
This KB article describes colouring specific cells in output from a few different approaches (incl. proc report, proc tabulate, data step, etc). I'm a little unsure if that's what you mean, or whether you think there's a way to have the cells in the source dataset coloured.
... View more
07-29-2017
11:27 AM
9 Likes
Australia, complete with programmatically generated stars. I only have 9.4M2 so I had to create a body polygon for the background, lacking as I do the wallcolor option. https://en.wikipedia.org/wiki/Flag_of_Australia and https://en.wikipedia.org/wiki/Union_Jack proc datasets lib=work nolist nodetails;
delete star;
run;
%let w = 10;
%let l = %eval(&w * 2);
%let inner = 4/9;
%let rad = 0.01745329252;
%macro drawStar(s,d,x,y,p);
%let points = %sysevalf(&p*2);
%let radius = %sysevalf((&d*&w)/2);
%do i = 1 %to &points;
%if %sysfunc(mod(&i,2)) = 0 %then %let div = &inner;
%else %let div = 1;
%let hyp = %sysevalf(&radius * &div);
%let movex = %sysfunc(cos((90 - (&i * (360/&points)))*&rad));
%let movey = %sysfunc(sin((90 - (&i * (360/&points)))*&rad));
%let sx = %sysevalf(&x + (&hyp*&movex));
%let sy = %sysevalf(&y + (&hyp*&movey));
proc sql;
insert into star(starpoly,sx,sy,r)
values(&s,&sx,&sy,%sysevalf(360/&points));
quit;
%end;
%mend drawStar;
data body;
mpolygon+1;
mx = 0; my = 0; output; * top left;
mx = &l; my = 0; output; * top right;
mx = &l; my = &l; output; * bottom right;
mx = 0; my = &l; output; * bottom left;
run;
data star;
length starpoly sx sy r 8;
stop;
*commonwealth = star1, 3/10 width, centre middle of lower hoist, 7 points;
%drawStar(1,3/10,&w/2,&w/4,7);
* alpha crucis = star2, 1/7 width, centre directly below centre fly 1/6 up from bottom edge, 7 points;
%drawStar(2,1/7,&w*1.5,&w/6,7);
* beta crucis = star3, 1/7 width, centre 1/4 left and 1/16 up from centre fly, 7 points;
%drawStar(3,1/7,&w*1.25,(&w/2)+(&w/16),7);
* gamma crucis = star4, 1/7 width, centre directly above centre fly 1/6 down from top edge, 7 points;
%drawStar(4,1/7,&w*1.5,&w-(&w/6),7);
* delta crucis = star5, 1/7 width, centre 2/9 right and 31/240 up from centre fly, 7 points;
%drawStar(5,1/7,(&w*1.5)+((&w*2)/9),(&w/2)+((&w*31)/240),7);
* epsilon crucis = star6, 1/10 width, centre 1/10 right and 1/24 down from centre fly, 5 points;
%drawStar(6,1/10,(&w*1.5)+(&w/10),(&w/2)-(&w/24),5);
run;
data standrew(drop=d f);
d = &w/10;
e = d/2;
*St Andrew top left to bottom right;
standrew + 1;
f = e / sin((30*&rad));
ux = f; uy = &w; output;
f = e / cos((30*&rad));
ux = &w; uy = &w - ((&w/2)-f); output;
ux = &w; uy = &w/2; output; * bottom right corner;
f = e / sin((30*&rad));
ux = &w-f; uy = &w/2; output;
f = e / cos((30*&rad));
ux = 0; uy = &w-f; output;
ux = 0; uy = &w; output; * top left corner;
*St Andrew bottom left to top right;
standrew + 1;
f = e / sin((60*&rad));
ux = 0; uy = &w - ((&w/2)-f); output;
f = e / cos((60*&rad));
ux = &w - f; uy = &w; output;
ux = &w; uy = &w; output;
f = e / sin((60*&rad));
ux = &w; uy = &w-f; output;
f = e / cos((60*&rad));
ux = f; uy = &w/2; output;
ux = 0; uy = &w/2; output;
run;
data stpatrick(drop=d e f);
d = &w/5;
e = d/6;
*St Patrick top left;
stpatrick + 1;
f = e / cos((30*&rad));
ux = 0; uy = &w; output;
ux = &w/2; uy = &w - (&w/4); output;
ux = &w/2; uy = &w - ((&w/4)+e); output;
ux = 0; uy = &w-f; output;
*St Patrick top right;
stpatrick + 1;
f = e / cos((60*&rad));
ux = &w-f; uy = &w; output;
ux = &w; uy = &w; output;
ux = &w/2; uy = &w-(&w/4); output;
ux = &w/2; uy = &w - ((&w/4)-e); output;
*St Patrick bottom right;
stpatrick + 1;
f = e / sin((60*&rad));
ux = &w; uy = &w - ((&w/2)-f); output;
ux = &w; uy = &w - (&w/2); output;
ux = &w/2; uy = &w-(&w/4); output;
ux = &w/2; uy = &w - ((&w/4)-e); output;
*St Patrick bottom left;
stpatrick + 1;
f = e / cos((60*&rad));
ux = 0; uy = &w - (&w/2); output;
ux = &w/2; uy = &w - (&w/4); output;
ux = &w/2; uy = &w - ((&w/4)+e); output;
ux = f; uy = &w - (&w/2); output;
run;
data stgeorgea(drop=d e e2);
d = &w/10;
e = d + ((d/3)*2);
e2 = e/2;
*St George white horizontal;
stgpoly1 + 1;
ux = 0; uy = &w - (&w/4 - e2); output;
ux = &w; uy = &w - (&w/4 - e2); output;
ux = &w; uy = &w - (&w/4 + e2); output;
ux = 0; uy = &w - (&w/4 + e2); output;
*St George white vertical;
stgpoly1 + 1;
ux = &w/2 - e2; uy = &w; output;
ux = &w/2 + e2; uy = &w; output;
ux = &w/2 + e2; uy = &w/2; output;
ux = &w/2 - e2; uy = &w/2; output;
run;
data stgeorgeb(drop=d d2);
d = &w/10;
d2 = d/2;
*St George red horizontal;
stgpoly2 + 1;
ux = 0; uy = &w - (&w/4 - d2); output;
ux = &w; uy = &w - (&w/4 - d2); output;
ux = &w; uy = &w - (&w/4 + d2); output;
ux = 0; uy = &w - (&w/4 + d2); output;
*St George red vertical;
stgpoly2 + 1;
ux = &w/2 - d2; uy = &w; output;
ux = &w/2 + d2; uy = &w; output;
ux = &w/2 + d2; uy = &w/2; output;
ux = &w/2 - d2; uy = &w/2; output;
run;
data unionjack;
set standrew stpatrick stgeorgea stgeorgeb;
run;
data flag;
set body unionjack star;
ods graphics on / reset=index border=off imagefmt=gif
antialias height=&w.in width=&l.in;
run;
proc sgplot data=flag noautolegend pad=0;
xaxis display=none offsetmin=0 offsetmax=0 values=(0 &l);
yaxis display=none offsetmin=0 offsetmax=0 values=(0 &w);
polygon x=mx y=my id=mpolygon / fill fillattrs=(color=CX00008B) nooutline;
polygon x=ux y=uy id=standrew / fill fillattrs=(color=CXFFFFFF) nooutline;
polygon x=ux y=uy id=stpatrick / fill fillattrs=(color=CXFF0000) nooutline;
polygon x=ux y=uy id=stgpoly1 / fill fillattrs=(color=CXFFFFFF) nooutline;
polygon x=ux y=uy id=stgpoly2 / fill fillattrs=(color=CXFF0000) nooutline;
polygon x=sx y=sy id=starpoly / fill fillattrs=(color=CXFFFFFF) nooutline rotate=r;
run;
... View more