Data visualization with SAS programming

add more in the boxplot

Reply
Frequent Contributor
Posts: 78

add more in the boxplot

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

SAS Super FREQ
Posts: 925

Re: add more in the boxplot

What version of SAS are you using?

Frequent Contributor
Posts: 78

Re: add more in the boxplot

Hi,

 

I am using SAS 9.4

 

Thanks,

Chen

SAS Super FREQ
Posts: 925

Re: add more in the boxplot

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

SAS Super FREQ
Posts: 1,148

Re: add more in the boxplot

Frequent Contributor
Posts: 78

Re: add more in the boxplot

Thanks, it really helps!!

Chen

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