BookmarkSubscribeRSS Feed
t75wez1
Pyrite | Level 9

Thank you so much for your insight.

SupermanJP
Obsidian | Level 7
 version 1.3 is available. I am revising document but program can be use.

https://github.com/SASPAC/sasplotter

please check the md files.

I added "note" parameter . this parameter insert the text statement into the graph template and display title or footnote.
t75wez1
Pyrite | Level 9

Hi Superman JP,

I saw "note=," parameter in version 1.3 but don't see your updated SAS Sankey macro code.

Looking forward to seeing how to use it exactly in Sankey document.

Thanks,

 

yabwon
Onyx | Level 15

Here is an instruction how to get version 1.3 in a form of a SAS package:

https://github.com/SASPAC/sasplotter/blob/main/sasplotter.md#install

 

Here is a snippet how to add footnote and title:

*--------------------------------------------------------;
*sankey example;
*--------------------------------------------------------;

proc format;
value domainf
1="day0"
2="day30"
3="day60"
4="day120";

value nodef
0="Drug A"
1="Drug B"
2="Drug C"
3="Drug D"
4="Drug E"
;
run;


data raw;
usubjid+1;
input day0 day30 day60 day120;
format day0 day30 day60 day120 nodef.;
cards;
0 2 3 4
0 2 3 4
0 2 3 4
2 1 2 4
2 1 2 4
2 1 2 4
2 1 2 4
2 1 2 4
2 1 4 3
4 3 2 1
4 3 2 1
4 3 2 1
4 3 2 1
;
run;
*--------------------------------------------------------;
*basic sankey;
*--------------------------------------------------------;
ods graphics / height=15cm width=20cm imagefmt=png imagename="sankey_basic" noborder;
title "Bacic Sankey";
ods html;
%sankey(
    data=raw,
    domain=day0 day30 day60 day120,
    domainfmt=domainf,
	note=%nrstr(entrytitle 'your title here';
			    entryfootnote halign=left 'your footnote here';
				entryfootnote halign=left 'your footnote here 2';)
	);
_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



SupermanJP
Obsidian | Level 7
Thanks bart.
t75wez1
Pyrite | Level 9

We can even add more features for titles and footnotes with color and fond size.

Thanks,

 
%sankey(
    data=raw,
    domain=day0 day30 day60 day120,
    domainfmt=domainf,
note=%nrstr(entrytitle 'your title here' / TEXTATTRS=(Color=purple Size=10 Style=normal Weight=Bold);
    entryfootnote halign=left 'your footnote here' / TEXTATTRS=(Color=purple Size=5 Style=normal Weight=Bold);
entryfootnote halign=left 'your footnote here 2' / TEXTATTRS=(Color=purple Size=5 Style=normal Weight=Bold);)
);
SupermanJP
Obsidian | Level 7

sankey_basic1.png

t75wez1
Pyrite | Level 9

Thanks to the ineffable Sanket chart I can apply to my project.

 

One more question here is how to get a weighted result if each observation is assigned a weighting value.

Thanks,

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 22 replies
  • 1225 views
  • 14 likes
  • 4 in conversation