BookmarkSubscribeRSS Feed
Barkamih
Pyrite | Level 9
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;
 

Hi guys 

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.  

Regards

Ibrahim 

5 REPLIES 5
Damo
SAS Employee

Hi @Barkamih

 

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.

 

Cheers,

Damo

 

 

 

Barkamih
Pyrite | Level 9

Thank so much Damo, 

I got it 

I appreciate that help, you saved my life, because I have met with my supervisor after 20min 

 

best regards 

 

Ibrahim  

Damo
SAS Employee

Hi @Barkamih

 

Great, I was only trying to help but if I saved your life it's even better Smiley Happy

Have a nice day.

 

Cheers,
Damo

Barkamih
Pyrite | Level 9

Hi Damo 

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. 

 

regards

 

Ibrahim  

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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:

http://blogs.sas.com/content/graphicallyspeaking/

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 5 replies
  • 1363 views
  • 5 likes
  • 3 in conversation