最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

sgplot - controlling the pattern of bars in nested plot SAS - Stack Overflow

programmeradmin3浏览0评论

I am unable to create stacked charts by group and subgroup in sas9.4, I want charts which are similar to excel graphs. The age group=ALL should have different pattern Please find the sample data and excel graph below (first image) and also the SAS graph (second image).

The graph as created in SAS: enter image description here

I need the plot to like in excel :

The age group=ALL should have different pattern. Could you please advise?

enter image description here

The age group=ALL should have different pattern as in excel. In SAS I could not change the pattern or color of group level=ALLyour text

I am unable to create stacked charts by group and subgroup in sas9.4, I want charts which are similar to excel graphs. The age group=ALL should have different pattern Please find the sample data and excel graph below (first image) and also the SAS graph (second image).

The graph as created in SAS: enter image description here

I need the plot to like in excel :

The age group=ALL should have different pattern. Could you please advise?

enter image description here

The age group=ALL should have different pattern as in excel. In SAS I could not change the pattern or color of group level=ALLyour text

Share Improve this question edited 2 days ago Tom 51.8k2 gold badges18 silver badges34 bronze badges asked Apr 2 at 8:50 user30139860user30139860 1 New contributor user30139860 is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct. 2
  • 1 Please post data and code you used to produce those pictures. – Tom Commented 2 days ago
  • Is this even a programming question? – Robert Commented 2 days ago
Add a comment  | 

1 Answer 1

Reset to default 0

data attrmap;  
length id $10 value $ 10 fillcolor $25 linecolor $ 25 fillattrs $25; 
input  id  $  value $ fillcolor $ linecolor $ fillattrs $ ;; cards; 
originmap 2002-1996  CX4D7EBF   CX4D7EBF    CX4D7EBF
originmap 2009-2003  CX90B0D9    CX90B0D9    CX90B0D9
originmap 2010-2017  CX13478C   CX13478C  CX13478C
    ;
run;



ods graphics / reset=all;
proc sgplot data=surivival_graph1     dattrmap=attrmap; 
  vbarparm category=agexppp response=cr_r /  
group=period attrid=originmap name="mybar" 
OUTLINEATTRS=(color=black) groupdisplay=cluster  
    fill ; 
  Highlow  High = hi_cr low = lo_cr x = agexppp /   
        highcap =serif lowcap = serif lineattrs=(color=red) labelattrs=(color=black) 
        highlabel= label group=period groupdisplay=cluster  
    fill    ;   
 xaxis label= "age group"  values=('20-49' '50-64' '65+' 'All')  ;
yaxis min=0 max=100 /*minor minorcount=10*/  label="surivival"  
offsetmin = 0.05 offsetmax = 0.05 ;
 
 
keylegend "mybar"   / title="";  

;   
format period $period. agexppp $agexpppc.; 
    ;  
run;
发布评论

评论列表(0)

  1. 暂无评论