Desktop productivity for business analysts and programmers

Proc format overriding the Attrmap

Reply
Frequent Contributor
Posts: 129

Proc format overriding the Attrmap

 

 

 

Hi All,

 

I'm using the Attrmap to recolour the vertical bars and then use a proc format to identify the change (pre trial/ post trial)

I loose the coloring from the attrid when I run the code with the proc format.

 

I'm thinking that it is the proc format that overrides the attrid in the proc sgplot?

 

Is there a way I can still use the attrid to colour the bars?

 

 

Cheers

 

Dean

 

Data Attrmap;
	Retain id "myid";
	input value $ fillcolor $8.;
	datalines;
	0 STOY
	1 DAGRY
	;
run;

proc format;
	value typeFmt
		0 = "Pre Trial"
		1 = "Post Trial" 
		;


proc SGPLOT data=work.Group dattrmap=attrmap;
	Title "Trial";
	format Trial typeFmt.;
	VBAR date / response=count Group=Trial attrid=myid name='Consult Calls' seglabel SEGLABELATTRS=(SIZE=12 WEIGHT=BOLD);
	yaxis display=(noline noticks) Label="Consult Calls" values=(0 to 80 by 5);
RUN;


this is what my data looks like

DateCountTrial
2018-07-02550
2018-07-03610
2018-07-04560
2018-07-05710
2018-07-06520

2018-07-09                                  

61
Ask a Question
Discussion stats
  • 0 replies
  • 141 views
  • 0 likes
  • 1 in conversation