BookmarkSubscribeRSS Feed
shahd
Quartz | Level 8

Hi all

I need to change the x axis values to be equal the y axis values for example max x =0.6 and max y=0.6 on the regression plot in sas

Here is my code

could anyone advise with this as this code keep giveing me errors 

proc sgplot data=calibration;
reg x=x1 y=y / CLM CLI;
haxis=axis1 hmax=0.6;
vaxis=axis2 vminor=0.6;
run;

2 REPLIES 2
PaigeMiller
Diamond | Level 26

There is no hmax option to the haxis statement; there is no haxis statement in PROC SGPLOT. You are also confusing PROC GPLOT code with PROC SGPLOT code, you can't do that.

 

proc sgplot data=calibration;
    reg x=x1 y=y/clm cli;
    yaxis max=0.6;
    xaxis max=0.6;
run;

Please look at the documentation for all the available options in PROC SGPLOT. https://documentation.sas.com/?cdcId=pgmmvacdc&cdcVersion=9.4&docsetId=grstatproc&docsetTarget=n0yjd...

--
Paige Miller
ballardw
Super User

@shahd wrote:

Hi all

I need to change the x axis values to be equal the y axis values for example max x =0.6 and max y=0.6 on the regression plot in sas

Here is my code

could anyone advise with this as this code keep giveing me errors 

proc sgplot data=calibration;
reg x=x1 y=y / CLM CLI;
haxis=axis1 hmax=0.6;
vaxis=axis2 vminor=0.6;
run;


All of the device based older SAS/Graph statements like AXIS, SYMBOL and PATTERN are not used by the ODS graphics procedures. Also the axis statements are xaxis and yaxis. Xaxis2 and Yaxis2 will produce axis markings on the top or right side respectively. Many of the options are similar but not exactly the same plus there are some interesting new ones such as valuesformat that allows specifying a different format for the values displayed on the axis than might be assigned to the variable for data labels

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 770 views
  • 0 likes
  • 3 in conversation