08-16-2017 11:42 AM
I use proc sgplot . the group is the column "Profil" with 4 values NA, P1, P2 and P3.
the values of xaxis are N, N+1, N+2, N+3...(years)
The problem is the following : I would like that xaxis values are sorted like N, N+1, N+2...N+8. but as you can notice in the enclosed picture , they are not sorted because the profiles P1 P2 and P3 have the x values N, N+1, N+2 But the NA profil has x values N+5 to N+8.
08-16-2017 12:18 PM
I succed to get the correct values in x axis by using min max values in variable and then I can do this :
xaxis display = (nolabel) discreteorder = FORMATTED values=(&v_min_xaxis. to &v_max_xaxis. by 1) ;
08-17-2017 05:36 AM
I succeeded to create the format like this
proc format ; picture Format_Year_Suite low-high = '00' (prefix='N + ') ; run;
and then within the proc sgplot I mentionne
format Suite_Year_4_Sort Format_Year_Suite. ;
the problem is that it works for all numbers except 0 which is not displays.
08-17-2017 01:11 PM
Perhaps something like:
proc format library=work; picture Format_Year_Suite 0 = 'N' (noedit) 0<-high = '09' (prefix='N + ') ; run; data _null_; do x= 0 to 10; put x= best5. +1 x= format_year_suite.; end; run;
Need further help from the community? Please ask a new question.