BookmarkSubscribeRSS Feed
ampatella
Calcite | Level 5

Hello,

I have a swimmer plot, created with PROC SGPLOT, with a large number of bars included, making each bar quite narrow. When I plot symbols associated with each bar, I cannot decrease the width of the symbol outline/border enough for the symbols to display properly. I am plotting symbols on each bar using a scatter statement, and also plotting a box to the left of each bar along the y-axis using the anno macro %sgrectangle. In each case, the symbol being plotted is so small, the outline ultimately overtakes most of the symbol. But I cannot find a way to decrease the outline width any less. Is there a minimum line width for symbol outlines?

 

Here is the code I am using with %sgrectangle to draw a box at the beginning of each bar:

Screenshot 2025-11-24 080704.png

 

And here is the current output:

 

Screenshot 2025-11-24 080837.png

 

 

 

 

 

 

You can see the boxes drawn to the left of the graph don't look optimal. The outline being drawn is too thick for how small the squares are. In order to match the width of each bar, each square should be drawn with approximately width and height = 3 pixels. But it appears the smallest option for LINETHICKNESS for the outline = 1 pixel.  Is there a way to make the LINETHICKNESS smaller??

 

I run into the same trouble with the symbols plotted on the graph with scatter statements. Here is the scatter statement code:

Screenshot 2025-11-24 081655.png

 

The symbols plotted end up all black, it appears the outline color completely takes over the symbol when plotted; no red is present at all.

 

I'm thinking the symbols being plotted are simply too small, and the outline options just aren't able to be small enough?

 

Any help with how to decrease the symbol outline width in either %sgrectangle or marker outline in the scatter statement is much appreciated! Thanks!

1 REPLY 1
sbxkoenk
SAS Super FREQ

I do not have an answer for you top-of-my-head ,

... but you might consult this blog-article.

It also contains links to doc and other articles. Maybe you will find your hidden diamond in there?

The SG annotation macros in SAS

 

Ciao,
Koen

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—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
  • 1 reply
  • 252 views
  • 1 like
  • 2 in conversation