Help using Base SAS procedures

Specifying y axis Order From 5 to 50 by 5

Reply
Contributor
Posts: 29

Specifying y axis Order From 5 to 50 by 5

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 

SAS Employee
Posts: 182

Re: Specifying y axis Order From 5 to 50 by 5

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

 

 

 

Contributor
Posts: 29

Re: Specifying y axis Order From 5 to 50 by 5

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  

SAS Employee
Posts: 182

Re: Specifying y axis Order From 5 to 50 by 5

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

Contributor
Posts: 29

Re: Specifying y axis Order From 5 to 50 by 5

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  

Highlighted
Super User
Super User
Posts: 8,634

Re: Specifying y axis Order From 5 to 50 by 5

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/

Ask a Question
Discussion stats
  • 5 replies
  • 176 views
  • 5 likes
  • 3 in conversation