BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Melk
Lapis Lazuli | Level 10

I am overlaying some plots (vbar and 2 scatters) on an sgplot statement but each overlay adds extra space between the 0 mark on the y axis and my x axis. How can I prevent this?

 

 

proc sgplot data=dat noautolegend noborder;
    vbarparm category=sex response=median;
    scatter x=sex y=median/ yerrorupper=quartile3 markerattrs=(size=0);
    scatter x=sex y=mylabel / markerattrs=(symbol=asterisk);
    yaxis values=(0 to 100 by 10);
    xaxis display=(nolabel) valueattrs=(size=12pt);
run;

1 ACCEPTED SOLUTION

Accepted Solutions
Jay54
Meteorite | Level 14

yaxis offsetmin=0.

 

Each plot type requests the preferred offset it needs.  Scatter plot wants preferred offset of the size of the marker.  So, adding a scatter layer will increase offsets by the size of the marker.

View solution in original post

3 REPLIES 3
PeterClemmensen
Tourmaline | Level 20

Can you show us a screen dump of what you mean?

Jay54
Meteorite | Level 14

yaxis offsetmin=0.

 

Each plot type requests the preferred offset it needs.  Scatter plot wants preferred offset of the size of the marker.  So, adding a scatter layer will increase offsets by the size of the marker.

Melk
Lapis Lazuli | Level 10
worked beautifully, thanks!

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
  • 3 replies
  • 1631 views
  • 0 likes
  • 3 in conversation