From: Gang Liang on
Thanks for the information. Now, I tend to think it is a version
issue. The color thing works fine under 9.2 but not 9.1.3. Maybe I
should complain why I'm still using 9.1.3 then...

On Mar 15, 9:26 pm, xlr82sas <xlr82...(a)aol.com> wrote:
> > Hi,
>
> >   I don't have 9.1.3 right now. But kde only needs two to fill the
> > histogram so it decides to use light blue in 9.2 phase 2. You can
> > force pdf to use more colors,  try my code below.
>
> >   Incidentally the code below does produce multiple colors in rtf and
> > pdf by default. I will see if I can dig up a template that might work
> > for 9.1.3
>
> > ods rtf file="c:\temp\glm.rtf";
> > ods graphics on;
> > ods select lsmeans diffs diffplot;
> > proc glimmix data=sashelp.class;
> > class age;
> > model weight = age; * normal distribution the default;
> > lsmeans age / diff cl adjust=tukey plot=diff(noabs);
> > run;
> > ods graphics off;
> > ods rtf close;
>
> > ods pdf file="c:\temp\glm.pdf";
> > ods graphics on;
> > ods select lsmeans diffs diffplot;
> > proc glimmix data=sashelp.class;
> > class age;
> > model weight = age; * normal distribution the default;
> > lsmeans age / diff cl adjust=tukey plot=diff(noabs);
> > run;
> > ods graphics off;
> > ods pdf close;- Hide quoted text -
>
> > - Show quoted text -
>
> Hi,
>
> Here is a template that in SAS 9.2 Phase II will allow you to change
> the colors of the bars in the histogram. I am a beginner with
> 'Templates' so perhaps others know of a simpler method. The 'cx'
> color  schemes are documented somewhere?
>
> Jus change the cx for gdata to get different colors.
>
> /* make sure the old template is deleted */
> proc template;
> list / store=work.templat;
> run;
> proc template;
> delete MyStatistical;
> run;quit;
> proc template;
> list / store=work.templat;
> run;
>
> ods path work.templat(update) sasuser.templat(update)
> sashelp.tmplmst(read);
> ods path (prepend) work.templat(update);
> proc template;
> define style MyStatistical;
>    parent = styles.statistical;
>    replace GraphColors /
>       'gdata' = cxFDCD6F  /* brown */
>   /*  'gdata' = cx000000     black */
>
>   /*   don't change anything below */
>       'gcdata' = cx000000
>       'goutlier' = cxB9CFE7
>       'gcoutlier' = cx000000
>       'gfit' = cx544838
>       'gcfit' = cx544838
>       'gconfidence' = cxE3C58A
>       'gcconfidence' = cxBA9C65
>       'gpredict' = cx6C5F4C
>       'gcpredict' = cx6C5F4C
>       'gpredictlim' = cxFAE2B3
>       'gcpredictlim' = cxFAE2B3
>       'gerror' = cx9C721C
>       'gcerror' = cxD5A64E
>       'ginsetheader' = colors('docbg')
>       'ginset' = cxFFFFFF
>       'greferencelines' = cxCDCDCD
>       'gheader' = colors('docbg')
>
>       'gconramp3cend' = cxFF0000
>       'gconramp3cneutral' = cxFF00FF
>       'gconramp3cstart' = cx0000FF
>
>       'gramp3cend' = cx6497D7
>       'gramp3cneutral' = cxFFFFFF
>       'gramp3cstart' = cxBB9570
>       'gconramp2cend' = cx6497EB
>       'gconramp2cstart' = cxFFFFFF
>       'gramp2cend' = cxB87F32
>       'gramp2cstart' = cxFFFFFF
>       'gtext' = cx000000
>       'glabel' = cx000000
>       'gborderlines' = cx000000
>       'goutlines' = cx000000
>       'ggrid' = cxA0A0A0
>       'gaxis' = cx000000
>       'gshadow' = cx000000
>       'glegend' = cxFFFFFF
>       'gfloor' = cxFFFFFF
>       'gwalls' = cxFFFFFF
>       'gcdata12' = cxF7AC4E
>       'gcdata11' = cxB38EF3
>       'gcdata10' = cx47A82A
>       'gcdata9' = cxC08A13
>       'gcdata8' = cx2597FA
>       'gcdata7' = cxB26084
>       'gcdata6' = cx7F8E1F
>       'gcdata5' = cx9D3CDB
>       'gcdata4' = cxC1161C
>       'gcdata3' = cx426952
>       'gcdata2' = cx763810
>       'gcdata1' = cx2A25D9
>       'gdata12' = cx7F5934
>       'gdata11' = cxC8573C
>       'gdata10' = cx679920
>       'gdata9' = cx5E528B
>       'gdata8' = cxD6C66E
>       'gdata7' = cxB87F32
>       'gdata6' = cx6F7500
>       'gdata5' = cx8AA4C9
>       'gdata4' = cxFDC861
>       'gdata3' = cx98341C
>       'gdata2' = cx8DA642
>       'gdata1' = cx6173A9
>       'gcfit2' = cxB26084
>       'gfit2' = cxB26084
>       'gcconfidence2' = cxB26084
>       'gconfidence2' = cxB26084
>       'gblock' = cxB26084
>       'gablock' = cxB26084
>       'gccontrollim' = cxB26084
>       'gcontrollim' = cxB26084
>       'gcruntest' = cxB26084
>       'gruntest' = cxB26084
>       'gcstars' = cxB26084
>       'gstars' = cxB26084
>       'gcclipping' = cxB26084
>       'gclipping' = cxB26084
> ;end;
> run;quit;
> /* show me the search path and my new template */
> ods path show;
> proc template;
> list / store=work.templat;
> run;
>
> goptions reset=all device=sasprtc;
> ods pdf file="c:\temp\kde.pdf" style=mystatistical;
> ods graphics on;
> proc kde data = sashelp.air;
>   univar air ;
> run;
> ods graphics off;
> ods pdf close;

First  |  Prev  | 
Pages: 1 2
Prev: DDE and macro recall
Next: Paired T-test in SAS