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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1 reply
  • 312 views
  • 0 likes
  • 2 in conversation