Data visualization with SAS programming

Color control

Accepted Solution Solved
Reply
Contributor
Posts: 40
Accepted Solution

Color control

proc sgplot data=Badrates_TotalPolicy_ave subpixel noborder;
series x=Logg_date y=mov_tot_6 / group=TotalPolicy  lineattrs=(thickness=3 );
series x=Logg_date y=mov_tot_6 / group=TotalPolicy    lineattrs=(thickness=3 );
series x=Logg_date y=mov_tot_6 / group=TotalPolicy    lineattrs=(thickness=3 );
 xaxistable _FREQ_ / class=TotalPolicy location=outside colorgroup=TotalPolicy;
xaxis display=(nolabel);
yaxis label='BadRate';
run;

How do I control the colors on the TotalPolicy so that top series is green, 2nd is yellow and 3rd is red? And the same for the table?


Accepted Solutions
Solution
‎08-24-2017 03:11 AM
Super User
Posts: 19,080

All Replies
Solution
‎08-24-2017 03:11 AM
Super User
Posts: 19,080

Re: Color control

PROC Star
Posts: 653

Re: Color control

series x=Logg_date y=mov_tot_6 / group=TotalPolicy  lineattrs=(thickness=3 color=green);
Contributor
Posts: 40

Re: Color control

[ Edited ]
ods html file='test.html' path='\\***\**\**\***\***\' (url=none);
proc sgplot data=Badrates_TotalPolicy_ave subpixel noborder;
styleattrs datacontrastcolors=(Green Gold Red) datalinepatterns=(1) 
           datasymbols=(circlefilled trianglefilled);
series x=Logg_date y=mov_tot_6 / group=TotalPolicy  lineattrs=(thickness=3 );
series x=Logg_date y=mov_tot_6 / group=TotalPolicy    lineattrs=(thickness=3 );
series x=Logg_date y=mov_tot_6 / group=TotalPolicy    lineattrs=(thickness=3 );
 xaxistable _FREQ_ / class=TotalPolicy location=outside colorgroup=TotalPolicy;
xaxis display=(nolabel);
yaxis label='BadRate';
run;
ods  html close;
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 124 views
  • 4 likes
  • 3 in conversation