BookmarkSubscribeRSS Feed
Ameurgen
Obsidian | Level 7

Hello sas community

 

Below my sas code and results, so my question is, looking at the figure , i cant differeciate with my 3 BHB levels (red, blue and green) they are crowded together(if the correct word) so if there are any solution in same figurei can separate them with SE include.

 

Thank you so much 

 

 

/*************************************/

/* ALL BH classe and DAMDIM */

Data lsmns11_INTR_bhb_ALL;
set lsmns11_INTR_bhb;
IF (Effect eq 'Dam_DIM*BHB_level');
SeUpper = estimate+StdErr;
SeLower = estimate-StdErr;
drop COW_age_CLV_MO dam_lact_no dam_clv_mo Cow_CLv_Mo effect df tvalue probt dam_YOB;
run;

title 'daughter NS vs dam_dim /BHB /ALL, P1';
proc sgplot data=lsmns11_INTR_bhb_ALL;
series x=Dam_DIM y=estimate / group=BHB_level ;
scatter x=Dam_DIM y=estimate / group=BHB_level
yerrorlower=SeLower yerrorupper=SeUpper;

xaxis label="Dam_dim/BHBlevels" values=(38 to 225 by 5);
yaxis label="Estimate/SE" values=(-1.3 to 11 by 0.1);
run;

 

 

Ameurgen_0-1695823035862.png

 

1 REPLY 1
ballardw
Super User

 One possibility, use Proc SGPANEL and use your BHB_level variable as the Panelby variable to create one plot for each value.

 

Another, use ODS Graphics to define a much wider graph area with the Width option.

 

Without any understanding of the data I might question what that X axis actually represents as well as what you are attempting to show. Maybe the idea for the plot isn't well conceived. I am not sure that including a series in that plot is actually helping convey any information.

 

 

 

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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
  • 485 views
  • 0 likes
  • 2 in conversation