From: Gang Liang on
I would like to channel output from the "ods graphics" statement to an
pdf file, but found that the output graphics are grey-scale. On the
other hand, the html output does have color. Please see the code
below.

BTW, I am using SAS 9.1.3. Does anyone know a way to get this around?
Thanks!

Gang

ods html;
ods graphics;
proc kde data = sashelp.air;
univar air;
run;
ods graphics off;
ods html close;

ods printer printer='sasprtc' color=full;
ods pdf;
ods graphics;
proc kde data = sashelp.air;
univar air;
run;
ods graphics off;
ods pdf close;
From: Sierra Information Services on
Perhaps the quickest and easiest way to do this is to specify a style
template in your ODS HTML statement. There are numerous examples of
how to do this in the SAS documentation, including the SAS/STAT module
documentation manual's chapter on ODS Stat Graphics, which is in
"experimental" status in 9.1

Andrew Karp
Sierra Information Services
http://www.sierrainformation.com

On Mar 15, 11:31�am, Gang Liang <gumpl...(a)gmail.com> wrote:
> I would like to channel output from the "ods graphics" statement to an
> pdf file, but found that the output graphics are grey-scale. On the
> other hand, the html output does have color. Please see the code
> below.
>
> BTW, I am using SAS 9.1.3. Does anyone know a way to get this around?
> Thanks!
>
> Gang
>
> ods html;
> ods graphics;
> proc kde data = sashelp.air;
> � univar air;
> run;
> ods graphics off;
> ods html close;
>
> ods printer printer='sasprtc' color=full;
> ods pdf;
> ods graphics;
> proc kde data = sashelp.air;
> � univar air;
> run;
> ods graphics off;
> ods pdf close;

From: Gang Liang on
Thanks for the reply. Actually I can produce color html output, and
the question is how to generate color pdf output...

On Mar 15, 11:33 am, Sierra Information Services <sfbay0...(a)aol.com>
wrote:
> Perhaps the quickest and easiest way to do this is to specify a style
> template in your ODS HTML statement.  There are numerous examples of
> how to do this in the SAS documentation, including the SAS/STAT module
> documentation manual's chapter on ODS Stat Graphics, which is in
> "experimental" status in 9.1
>
> Andrew Karp
> Sierra Information Serviceshttp://www.sierrainformation.com
>
From: xlr82sas on
On Mar 15, 1:17 pm, Gang Liang <gumpl...(a)gmail.com> wrote:
> Thanks for the reply. Actually I can produce color html output, and
> the question is how to generate color pdf output...
>
> On Mar 15, 11:33 am, Sierra Information Services <sfbay0...(a)aol.com>
> wrote:
>
>
>
> > Perhaps the quickest and easiest way to do this is to specify a style
> > template in your ODS HTML statement.  There are numerous examples of
> > how to do this in the SAS documentation, including the SAS/STAT module
> > documentation manual's chapter on ODS Stat Graphics, which is in
> > "experimental" status in 9.1
>
> > Andrew Karp
> > Sierra Information Serviceshttp://www.sierrainformation.com- Hide quoted text -
>
> - Show quoted text -

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;
From: xlr82sas on
On Mar 15, 5:20 pm, xlr82sas <xlr82...(a)aol.com> wrote:
> On Mar 15, 1:17 pm, Gang Liang <gumpl...(a)gmail.com> wrote:
>
>
>
>
>
> > Thanks for the reply. Actually I can produce color html output, and
> > the question is how to generate color pdf output...
>
> > On Mar 15, 11:33 am, Sierra Information Services <sfbay0...(a)aol.com>
> > wrote:
>
> > > Perhaps the quickest and easiest way to do this is to specify a style
> > > template in your ODS HTML statement.  There are numerous examples of
> > > how to do this in the SAS documentation, including the SAS/STAT module
> > > documentation manual's chapter on ODS Stat Graphics, which is in
> > > "experimental" status in 9.1
>
> > > Andrew Karp
> > > Sierra Information Serviceshttp://www.sierrainformation.com-Hide quoted text -
>
> > - Show quoted text -
>
> 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;

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