%let name=south_korea_population; /* Set your current-working-directory (to read/write files), if you need to ... %let rc=%sysfunc(dlgcdir('c:\someplace\public_html')); */ filename odsout '.'; /* Got the data from Wikipedia: https://en.wikipedia.org/wiki/Demographics_of_South_Korea */ data my_data; informat population comma12.0; input year population; format population_millions comma8.1; population_millions=population/1000000; datalines; 1960 25,012,374 1970 32,240,827 1980 38,123,775 1990 42,869,283 2000 47,008,111 2010 49,554,112 ; run; /* Be sure to use the 'nowall' option when you annotate images behind the graph, otherwise the graph's background wall will obscure the annotated image! */ data anno_image; length function $10 drawspace $20; function='image'; height=100; width=100; transparency=0; drawspace='WallPercent'; /* using flag image from Wikipedia Korea page, cropped & lightened in Photoshop */ image='south_korea_flag_cropped_lightened.png'; layer='back'; run; /* add an extra axis label, in Korean */ /* million persons https://en.wiktionary.org/wiki/%EB%B0%B1 https://en.wiktionary.org/wiki/%EB%A7%8C https://en.wiktionary.org/wiki/%EB%AA%85 */ ods escapechar='^'; data anno_axis_label; length function $10 drawspace $20; function='text'; drawspace='GraphPercent'; x1=1.5; y1=85; anchor="Left"; textsize=12; width=100; widthunit="percent"; textcolor="gray33"; textfont="Malgun Gothic"; textweight="Bold"; label="^{unicode 'BC31'x}^{unicode 'B9CC'x} ^{unicode 'BA85'x}"; run; data anno_all; set anno_image anno_axis_label; run; ODS LISTING CLOSE; ODS HTML path=odsout body="&name..htm" (title="South Korea Population") style=htmlblue; ods graphics / imagefmt=png imagename="&name" width=700px height=600px noborder imagemap; title1 color=gray33 ls=0.5 h=23pt "South Korea Population"; /* How did I find these Korean Characters? ... First I used Google Translate to translate the English Text to Korean: https://www.google.com/search?q=google+translate&oq=google+translate I selected English on the right, and Korean on the left, and entered the Engligh text. Then I hilighted each of the Korean characters, and right-clicked and did a Google search. The first character returned this page: https://en.wiktionary.org/wiki/%ED%95%9C https://en.wiktionary.org/wiki/%EA%B5%AD And near the top/right, it told me it is unicode character U+D55C */ ods escapechar='^'; title2 h=6pct c=gray33 font="Malgun Gothic" "^{unicode 'D55C'x}^{unicode 'AD6D'x} ^{unicode 'C778'x}^{unicode 'AD6C'x}"; proc sgplot data=my_data noborder nowall sganno=anno_all; label population_millions='million persons'; vbar year / response=population_millions stat=sum datalabel datalabelattrs=(size=12pt weight=bold color=gray33) fillattrs=(color=cx00dd00 /*transparency=.08*/) outlineattrs=(color=black) nostatlabel /* no word '(sum)' on the Y axis label */ dataskin=sheen barwidth=.6; yaxis labelposition=top labelattrs=(size=12pt weight=bold color=gray33) valueattrs=(size=12pt weight=bold color=gray33) display=(noticks noline) grid; xaxis labelattrs=(size=12pt weight=bold color=gray33) valueattrs=(size=12pt weight=bold color=gray33) display=(nolabel noticks); run; quit; ODS HTML CLOSE; ODS LISTING;