BookmarkSubscribeRSS Feed
echoli
Obsidian | Level 7

Hi All,

 

I want to add P-value in the boxplot (in the rectangle) as shown below, add idea?? I use sgplot, here is my code

 

ods html;
proc sgplot data=change_t;
vbox col1 / category = _name_ group = group
lineattrs=(pattern=solid) whiskerattrs=(pattern=solid);
xaxis display=(nolabel) type = discrete ;
yaxis grid;
keylegend / location = inside position = topright across = 2;
run;
ods html close;

 

Thanks,

Chen

boxplot.png

5 REPLIES 5
DanH_sas
SAS Super FREQ

What version of SAS are you using?

echoli
Obsidian | Level 7

Hi,

 

I am using SAS 9.4

 

Thanks,

Chen

DanH_sas
SAS Super FREQ

Assuming you have these p-values in another dataset, you can match-merge them into the original data and use an XAXISTABLE to display them, either inside the axis area or below the axis (your rectangle area). Take a look at that approach and see if that gives you what you want.

 

Thanks!
Dan

Jay54
Meteorite | Level 14
echoli
Obsidian | Level 7

Thanks, it really helps!!

Chen

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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