BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Kevin_Viel
Obsidian | Level 7

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

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenKuhfeld
Ammonite | Level 13

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.

View solution in original post

7 REPLIES 7
PaigeMiller
Diamond | Level 26

@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?

--
Paige Miller
Kevin_Viel
Obsidian | Level 7

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

PaigeMiller
Diamond | Level 26

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.

--
Paige Miller
Kevin_Viel
Obsidian | Level 7

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

WarrenKuhfeld
Ammonite | Level 13

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
Obsidian | Level 7

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 🙂

WarrenKuhfeld
Ammonite | Level 13

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!

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 7 replies
  • 1348 views
  • 1 like
  • 3 in conversation