Hi Guys,
I'm using the following code for my data to preset 4 groups in one graph, as you see this code can do what I'm looking for but the only issue is that I couldn't make the line graphs in different looking such as, continues dots, not continues line or whatever any differentiation to make line different for each group.
by default, these graphs are in different colours, but different colures do not work for black and white printing.
I'll be happy for your help
Barkamih
proc nlin data = milkno method = marquardt;
parms A = 15 B = -0.19 C = 0.0012 ;
by pr ;
model TEST_DAY_milk_kg = A * Time **b * exp(-C*Time);
output out = Fit predicted = pred ;
symbol1 interpol= join value = star color= black;
symbol2 interpol = none value = none color = red;
run;
QUIT;
proc sort data=fit;
by time;
RUN;
proc sgplot data=fit;
series y=pred x=time / group=pr;
xaxis values=(1 to 12 by 1);
yaxis values=(0 to 40 by 5);
run;
With PROC SGPLOT, you need the ATTRPRIORITY=NONE option and the STYLEATTRS statement. Example:
ods graphics/attrpriority=none;
proc sgplot data=sashelp.stocks(where=(stock='IBM' or stock='Microsoft'));
styleattrs datacontrastcolors=(black black) datalinepatterns=(dot solid);
series x=date y=open/group=stock ;
run;
The list of line patterns is here: https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=grstatproc&docsetTarget=p...
With PROC SGPLOT, you need the ATTRPRIORITY=NONE option and the STYLEATTRS statement. Example:
ods graphics/attrpriority=none;
proc sgplot data=sashelp.stocks(where=(stock='IBM' or stock='Microsoft'));
styleattrs datacontrastcolors=(black black) datalinepatterns=(dot solid);
series x=date y=open/group=stock ;
run;
The list of line patterns is here: https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=grstatproc&docsetTarget=p...
Thanks million
It works perfectly
Regards
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 25. Read more here about why you should contribute and what is in it for you!
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.