BookmarkSubscribeRSS Feed
KOKIUSMAT
Fluorite | Level 6

Hi,

I have made a custom scatter plot with visible labels. I have a problem: some labels are overlapped. 

Is it possible to move them in the graph or to define their coordinates?

 

Thanks

 

 

1 REPLY 1
ballardw
Super User

Please provide example data and plot code. Your code is needed because the method details may vary between procedures SGPlot, Sgpanel (or if real old code using Proc Gplot) or the Graph Template Language. Plus multiple options can affect the behavior of labels.

 

Note that one approach is to use a TEXT plot with a variable to hold a position relative to the marker coordiates. READ the documentation as I'm not going to describe that.

 

You might also consider reducing font size of the labels but without data, the ods style and destination you are using and ODS Graphics setting related to your graph size that is hard to tell if it would work for a specific graph.

 

If you have a large enough number of points it may not be possible to prevent all of the labels from overlapping. Also, the longer that the text for the label is then the more likely to have concerns with overlaps.

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!

Discussion stats
  • 1 reply
  • 573 views
  • 0 likes
  • 2 in conversation