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

Yeah, if you mean plotting discretely, the line-markers for non-Feb/Aug months definitely don't show up - tried it already.

Looks like this is not possible, in that case. It's good to know so that I don't spend additional time pondering it. Thank you!

Jay54
Meteorite | Level 14

SGPLOT / GTL do support formats for discrete axis including UDF and Picture format.  I have used some simple picture formats (to change sign of the value) with SGPLOT.   The format should be provided on the XAXIS statement, to avoid categorization.  However, your mileage will vary because the Java format code does not support all possibilities.

 

Some workarounds are possible.  See this article on Stock Chart.  The idea here is that the x-axis can be replaced by an XAXISTABLE displaying the values that you want coming from a character column in the data set.  The formatting to create the character column is done in SAS data step code, so all formats should work.  SGPLOT only draws what you have already computed using the XAXISTABLE.

sm4
Quartz | Level 8 sm4
Quartz | Level 8

Thanks for your reply!

 

Looks like regular user-created formats will show up but picture formats won't, based on my experience and what documentation/others say. The link you shared is really interesting - did not know it was possible to suppress the actual axis and bring in something else. This may be very relevant for separate problems I've been having, thank you! 

GraphGuy
Meteorite | Level 14

If there's no work-around for Proc Sgplot, perhaps you could create the plot using Proc Gplot (?)

 

Reeza
Super User

I ran and verified @DR_Majeti solution, it does work as intended.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 19 replies
  • 3782 views
  • 10 likes
  • 7 in conversation