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 2025: Register Now

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!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 19 replies
  • 5091 views
  • 10 likes
  • 7 in conversation