BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
FelixS
Calcite | Level 5

Hello,

i want to change the labels of the tickvalues, and i couldn't find a solution how to do that. I think somehow in the following part i need to change something to change the labels.

 

layout overlay / xaxisopts=(display=none) walldisplay=none yaxisopts=(display=(tickvalues) tickvalueattrs=(size=8)) ;
                              scatterplot x=tatrisk y=stratum / group=stratum  markercharacter=atrisk markercharacterattrs=(size=8);
                         endlayout;

The Result i get in my graph is following:

SGRender20.png

As you can see in the Risktable, the Labels are "3: AML-Low Risk", "2: AML-High Risk", ... i want to change them in "AML-Low Risk", "AML-High-Risk" and so on....

 

When i put the same risk table with a blockblot statement inside the graph, i can just make this:

blockplot x=tatrisk&i.  block=AtRisk&i.  /  display=(values label) valuehalign=start valueattrs=Graphdata&i. (size=8) labelattrs=(size=8);

with display=(values label) i get the desired result (the labes i changed before...

 

But how can i solve this problem with the "overlay solution"???

 

Maybe you can help me.

 

Tahanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Jagadishkatam
Amethyst | Level 16

Sorry i doubt if the above solution will work, if not could you please try the below one create a new variable related to stratum. at the momnet i believe the variable stratum has the values as "3: AML-Low Risk", "2: AML-High Risk"...... so create a new variable related to stratum but has values as "AML-Low Risk", "AML-High Risk"...... then use the class=new variable on the BlockPlot statement. This will disply the label as per the values that are present in the newvariable.

 

blockplot x=tatrisk&i.  block=AtRisk&i.  /  display=(values label) valuehalign=start valueattrs=Graphdata&i. (size=8) labelattrs=(size=8)
class=newvariable;

 

 

Thanks,
Jag

View solution in original post

3 REPLIES 3
Jagadishkatam
Amethyst | Level 16

The way we could change the label of the block plot is to change the variabe values in the atrisk&i, i believe at the moment the atrisk&i is resolving to "3: AML-Low Risk", "2: AML-High Risk" please change those labels to "AML-Low Risk", "AML-High Risk"...... and may be you could see the difference.

Thanks,
Jag
Jagadishkatam
Amethyst | Level 16

Sorry i doubt if the above solution will work, if not could you please try the below one create a new variable related to stratum. at the momnet i believe the variable stratum has the values as "3: AML-Low Risk", "2: AML-High Risk"...... so create a new variable related to stratum but has values as "AML-Low Risk", "AML-High Risk"...... then use the class=new variable on the BlockPlot statement. This will disply the label as per the values that are present in the newvariable.

 

blockplot x=tatrisk&i.  block=AtRisk&i.  /  display=(values label) valuehalign=start valueattrs=Graphdata&i. (size=8) labelattrs=(size=8)
class=newvariable;

 

 

Thanks,
Jag
FelixS
Calcite | Level 5

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 3 replies
  • 1119 views
  • 1 like
  • 2 in conversation