BookmarkSubscribeRSS Feed
QuinnCade
Calcite | Level 5

I am currently trying to use PROC SGPLOT in SAS to create a series plot with five lines (8th grade, 10th grade, 12th grade, College Students, and Young Adults). The yaxis is a percentage of prevalence in drug use ranging from 0-100. The xaxis is the year 1975-2019, but formatted (using proc format) so that it shows the value of year as '75-'19. I would like to label each line using its respective group 

The "curvelabelpos=" does not give the option to place my label above the first data point of "12th Grade" and "College Students" so that my xaxis does not have all of the space on the left side of the plot. How do I move these two labels above the first data point of each line so that the xaxis does not have empty space?

 

 

2 REPLIES 2
PeterClemmensen
Tourmaline | Level 20

@QuinnCade Hi and welcome to the SAS Community 🙂

 

Can you show us your code please?

DanH_sas
SAS Super FREQ

You will need to use the OFFSETMIN option on the XAXIS statement to reclaim that space allotted for the data labels.

 

Hope this helps!

Dan

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 2 replies
  • 448 views
  • 2 likes
  • 3 in conversation