BookmarkSubscribeRSS Feed
MoMoMay
Calcite | Level 5

I want to create customized interval for the Y axis scale on my line chart. Under the option of graph builder, I can choose the Y axis range. However, it just offered the minimum and maximum. I want to disable the auto scale of Y axis and set the customized interval of the Y axis scale. For example, it auto scale the interval of Y axis is 5...10...15...20...etc. I want to change the interval to be a 2..4...6..8...10...etc. How can I do it? Thanks

2 REPLIES 2
z525541
Calcite | Level 5

I need help with this too! 

acordes
Rhodochrosite | Level 12

pic.pngpic1.png

 

You can achieve this with user-defined formats. 

First run the code, then enter manage environment with admin rights.

assume super-user role and create empty format lib, copy the code-created format to it. 

call the format when promoting the table.

 

now in VA you can see the correct behaviour of the variable (according to the format). 

 


proc casutil;
deletesource casdata="myFmtLib.sashdat" incaslib="public";
run;

proc format library=work.formats casfmtlib="myFmtLib";
value mmonth
0-6 = "0"
6-18="12"
18-30 = "24"
30-42="36"
42-54 = "48"
54-66="60"
66-78 = "72"
78-90="84"
other=">90"
;
run;


cas mysession savefmtlib fmtlibname=myFmtLib         /* 5 */
   table="myFmtLib.sashdat" caslib=PUBLIC replace;

cas mysession addfmtlib fmtlibname=myFmtLib     /* 2 */
   table="myFmtLib.sashdat" caslib=PUBLIC replacefmtlib;

cas mysession promotefmtlib fmtlibname=myFmtLib REPLACE;

data public.rema1(promote=yes);
set casuser.rema;
FORMAT f_meses_efectivos mmonth_copy.;
f_meses_efectivos=meses_efectivos;
run;

 

 

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

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