01-31-2018 04:28 AM
proc nlin data = new 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; proc gplot data=fit; plot pred*time TEST_DAY_milk_kg*time/overlay; run;quit;
I would like to specify Y axis for this code, please let me know the right order to do in this case, and the best code to label Y with exact numbers.
01-31-2018 04:45 AM
You may want to define your AXIS statement with the ORDER option, similar to:
axis1 order= (5 to 50 by 5);
Then you need to reference AXIS1 with your GPLOT procedure, similar to:
proc gplot data=fit; plot pred*time TEST_DAY_milk_kg*time/overlay vaxis=axis1; run;quit;
Using Example 1: Generating a Simple Bubble Plot the updated code would be:
goptions reset=all border; data jobs; length eng $5; input eng dollars num; datalines; Civil 27308 73273 Aero 29844 70192 Elec 22920 89382 Mech 32816 19601 Chem 28116 25541 Petro 18444 34833 ; title1 "Member Profile"; title2 "Salaries and Number of Member Engineers"; axis1 offset=(5,5); axis2 order= (10000 to 40000 by 5000); proc gplot data=jobs; format dollars dollar9.; bubble dollars*eng=num / haxis=axis1 vaxis=axis2; run; quit;
Hope that helps.
02-06-2018 07:42 AM
I came to you again
I'm looking for code for this occasion P = -(B+1)*LOG(C) which related to my previous code of the first post.
01-31-2018 05:05 AM
Move to proc sgplot or template. This will give you a vast array of options and control over what is an ancient graphing system (i.e. sgplot and gtl have been around for years now). This website gives almost complete information on anything you would want to do graphing: