One might need to add custom text to an SGPLOT using the symbols. Does a list of the hex code or unicode for them exist?
Thank you,
Kevin
https://documentation.sas.com/doc/en/pgmsascdc/v_016/statug/statug_templt_sect019.htm
You might find this example helpful. In addition to the example, there are links to external resources on unicode.
@Kevin_Viel wrote:
One might need to add custom text to an SGPLOT using the symbols. Does a list of the hex code or unicode for them exist?
You need to add "custom text" such as ... give an example ...
Usually, symbols in SGPLOT are not "text" but pre-defined markers. Can clarify this?
Sure. Consider that I used the marker symbol diamondfilled. I might want to "Blue diamondfilled - subject in Cohort 1 censored" to the insight or to a FOOTNOTE statement. If the symbol is X or PLUS (+), then I can just type, but if I need to use the symbol, then I would need the corresponding hex code or unicode. I can think of other places, such as a discussion section, that I might like to use symbol instead of "blue filled diamonds".
Thank you,
Kevin
There is a legend that is created by PROC SGPLOT, where you can specify that the text in the legend is whatever you want it to be.
You would have to use the KEYLEGEND statement, example for ellipses which would also work for marker symbols https://documentation.sas.com/doc/en/pgmmvacdc/9.4/grstatproc/p0xmbppzx71smbn1203aaif96z86.htm#p0luj...
There are also discrete attribute maps, for example: https://documentation.sas.com/doc/en/pgmmvacdc/9.4/grstatproc/p1mw2iuqv63l1on1wtt3hyqhkcwe.htm
If that's not what you want, then I am still confused about what you are trying to do.
Thanks again. I just wanted to be able to include the symbol in text in case I need to clarify a symbol (or color thereof). Dr. Kuhfeld provided what I believe will be a way.
Kind regards,
Kevin
https://documentation.sas.com/doc/en/pgmsascdc/v_016/statug/statug_templt_sect019.htm
You might find this example helpful. In addition to the example, there are links to external resources on unicode.
Sir,
That is exactly for what I was searching! I will need to free up time to experiment, but I think along with the text color style element, I can match the symbol. I will also have to tag a medical writer to see if this is even desirable, but at least I can add custom text, say in a footnote file that the biostats writes (and I would modify).
Thank you,
Kevin
PS I burned at least 30 minutes searching for this. I guess I need to improve my search skills 🙂
Glad I could help! Searching is often tough. I wrote that part of the documentation before I retired from SAS, I knew it was there somewhere, and I still had trouble finding it. I always hoped that and many other examples I wrote would be useful, but as SAS developers, we usually don't hear from people when they find precisely what they need. Thanks for the feedback; it made my day!
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.