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

I looked at several blogs to determine the correct syntax for breaking the axis in SAS which I tried in SAS UE, both nothing happened (i.e., no error ) but the axix was not split.  I have included my code.  The specific code related to Y axis splitting is [styleattrs axisbreak=bracket;
yaxis ranges=(min-0.01 2-max) values=(0 to 25 by 5) valueshint;]  Can someone tell me if this function does exist is SAS UE and if it doesn't what is the correct syntax one should use?  The data is also attached.

Obs 	TIME 	P5 	p50 	p95 	LCL5 	UCL5 	LCL50 	UCL50 	     LCL95 	UCL95
1 	0 	0 	0 	0 	0 	0 	0 	0 	        0 	0
2 	0.5 	0.0507 	0.070265 1.69 	0.0001 	0.00947 0.0585505 0.0815465 	2.41 	4.35
3 	1 	0.0509 	0.330055 6.39 	0.0157 	0.0364 	0.1717 	0.74738 	6.37 	10.9
4 	1.5 	0.051 	0.64255 7.8 	0.0208 	0.0434 	0.28176 1.087815 	7.57 	12.3
5 	2 	0.051 	1.02435 7.92 	0.0298 	0.0524 	0.411535 1.315705 	8.71 	14.1
6 	3 	0.0572 	1.0427 	7.53 	0.0396 	0.068 	0.6423 	2.133895 	13.5 	22.1
7 	4 	0.0628 	1.07775 8.93 	0.0464 	0.0757 	0.84621 2.577755 	15.9 	26.2
8 	5 	0.0684 	2.0512 	13.8 	0.05 	0.0782 	0.88679 2.72446 	16.2 	26.4
9 	6 	0.0739 	2.43815 15 	0.0498 	0.0806 	0.898395 2.57148 	15.7 	24.8
10 	6.5 	0.0827 	2.30515 14.5 	0.0492 	0.0801 	0.901725 2.534675 	15 	24.2
11 	7 	0.0803 	2.6039 	13.9 	0.0481 	0.0802 	0.8415 	2.396155 	14.3 	23
12 	7.5 	0.0921 	2.4849 	13.6 	0.0498 	0.0789 	0.831405 2.320825 	13.5 	21.5
13 	8 	0.0817 	2.27025 12.6 	0.049 	0.0782 	0.78765 2.168385 	13 	20.4
14 	10 	0.0754 	1.6625 	8.89 	0.0438 	0.0728 	0.67855 1.729315 	10.4 	16.5
15 	12 	0.0587 	0.87865 5.95 	0.0379 	0.0666 	0.50421 1.290395 	8.01 	12.9
16 	16 	0.0546 	0.2874 	3.66 	0.028 	0.0536 	0.285965 0.72648 	4.65 	7.67
17 	24 	0.0529 	0.0856 	0.906 	0.0112 	0.0324 	0.107645 0.244033 	1.61 	2.79
18 	. 	. 	. 	. 	. 	. 	. 	. 	. 	.
ods listing gpath='/folders/myfolders/CONCERTA_QUAL/SAS';
 ods graphics/imagename='8eatestSIMD' imagefmt=png;
 
  
  proc sgplot data=PKALLD NOAUTOLEGEND;
  title "Fit and Confidence Band from Precomputed Data";
  styleattrs axisbreak=bracket;
  yaxis ranges=(min-0.01 2-max) values=(0 to 25 by 5) valueshint;
  band x=TIME lower=lcl5  upper=UCL5 / legendlabel="95% CLI" name="band1" FILLATTRS=(color="green"); 
  
band x=TIME lower=LCL50 upper=UCL50 /legendlabel="95% CLM" name="band2" FILLATTRS=(color="lightblue"); band x=TIME lower=LCL95 upper=UCL95 /legendlabel="95% CLM" name="band3" FILLATTRS=(color="lightgreen"); SCATTER X=TIME Y=P5/ markerattrs=(symbol=Circle color=RED); SCATTER X=TIME Y=P50/ markerattrs=(symbol=SQUAREFILLED color=RED); SCATTER X=TIME Y=P95/ markerattrs=(symbol=ASTERISK color=RED); xaxis label='Time (hrs)'; yaxis label='Concentration(ng/ml)'; RUN; quit;
1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

You have 2 YAXIS statements. The last one is likely overriding the first one, make them one and try that.

View solution in original post

4 REPLIES 4
Reeza
Super User

You have 2 YAXIS statements. The last one is likely overriding the first one, make them one and try that.

jacksonan123
Lapis Lazuli | Level 10

Combining the statements resolved the issue.

DanH_sas
SAS Super FREQ

You have two YAXIS statements in your proc definition. The second one wins, which is why you get the custom label, but no splitting. Combine the two statements into one and you will get the splitting.

 

Hope this helps!

Dan

jacksonan123
Lapis Lazuli | Level 10

Yes it did resolve the issue.

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