Date: Thu, 9 Jul 2009 12:18:56 -0400
Reply-To: Randy Herbison <RandyHerbison@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Randy Herbison <RandyHerbison@WESTAT.COM>
Subject: FW: ods layout (gridded), pdf graph issue
Content-Type: text/plain; charset="us-ascii"
Sometimes, a spell-checker just isn't enough:
Hopefully, we'll hear from a GTL expert.
-----Original Message-----
From: Randy Herbison
Sent: Thursday, July 09, 2009 12:08 PM
To: 'Huang, Ya'; SAS-L@LISTSERV.UGA.EDU
Subject: RE: ods layout (gridded), pdf graph issue
Ya,
You should be able to use color to suppress symbols and lines. GTL may offer a more sophisticated way to accomplish what the symbol statement's interpol option does. Hopefully, we'll here from a GTL expert.
-Randy
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Huang, Ya
Sent: Thursday, July 09, 2009 11:13 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: ods layout (gridded), pdf graph issue
Thanks Randy,
I'll give it a try. For the symbol controlled by style, is it possible to do something like i=none in traditionally symbol statement? I need to control the symbol, sometimes I need symbol only, sometimes, I need to connect them (i=none or i=j, i=r etc.).
Ya
-----Original Message-----
From: Randy Herbison [mailto:RandyHerbison@westat.com]
Sent: Thursday, July 09, 2009 8:03 AM
To: Huang, Ya; SAS-L@LISTSERV.UGA.EDU
Subject: RE: ods layout (gridded), pdf graph issue
Ya,
You can try the ODS PDF statement's DPI option to increase the dpi. According to the documentation, the default is 150.
For the symbols:
1) See PROC SGPLOT's MARKERATTRS option.
2) Create or modify a style template. Here's a piece of code from the sasweb template:
style GraphDataDefault from GraphComponent /
endcolor = GraphColors('gramp3cend')
neutralcolor = GraphColors('gramp3cneutral')
startcolor = GraphColors('gramp3cstart')
markersize = 7px
markersymbol = "circle"
linethickness = 1px
linestyle = 1
contrastcolor = GraphColors('gcdata')
color = GraphColors('gdata');
style GraphData1 from GraphComponent /
markersymbol = "circle"
linestyle = 1
contrastcolor = GraphColors('gcdata1')
color = GraphColors('gdata1');
style GraphData2 from GraphComponent /
markersymbol = "plus"
linestyle = 4
contrastcolor = GraphColors('gcdata2')
color = GraphColors('gdata2');
3) Use GTL tp roll your own graph. Here's a piece of code from a
GTL program that includes a scatter plot:
scatterplot x=LABELVAL y=VAR / markercharacter=SEG2 group=SEG
markercharacterattrs=(size=18pt color=black);
In this case, the marker character and group are data set variables.
-Randy
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Ya Huang
Sent: Wednesday, July 08, 2009 7:57 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: ods layout (gridded), pdf graph issue
Thanks Randy,
I suspected that is the case when I read the paper 043-2009 (SGF), where all samples used sgplot instead of gplot. I just tried sgplot for the testing code and got good output. But it is not good enough yet, for that the resolution of the picture is much lower than sasprtc can offer, also I lost all the controls for symbols (maybe there is way, but I don't know yet).
I'm kind stuck here. My old programs for v8 based on startpage control won't work anymore. Tried the new "pre-production" ods layout, also has some limitation :-(
Ya
On Wed, 8 Jul 2009 17:11:40 -0400, Randy Herbison <RandyHerbison@WESTAT.COM> wrote:
>Ya,
>
>At least until 9.2 Phase 2, traditional SAS/Graph doesn't play well
>with
ODS.
>
>You may be able to manipulate the ODS region size and/or the graph size
>to
get it to work properly.
>
>When using SAS 9.2 Phase 1, it was exactly this problem that motivated
>me
to use the Graph Template Language.
>
>-Randy
>
>-----Original Message-----
>From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Ya
Huang
>Sent: Wednesday, July 08, 2009 3:37 PM
>To: SAS-L@LISTSERV.UGA.EDU
>Subject: ods layout (gridded), pdf graph issue
>
>
>Hi there,
>
>The following creates a pdf file as I expected in terms of "layout".
>But
the graph area is very small and I got the warning message like
>this:
>
>WARNING: The specified/default value of HSIZE of 2.0000 inches and
>HORIGIN
of 0.0000 inches exceeds the maximum for the SASPRTC
> printer. HSIZE is changed to 1.0000 inches.
>WARNING: The specified/default value of VSIZE of 2.0000 inches and
>VORIGIN
of 0.0000 inches exceeds the maximum for the SASPRTC
> printer. VSIZE is changed to 1.0000 inches.
>WARNING: The RIGHTMARGIN option value was too large and was ignored.
>WARNING: The BOTTOMMARGIN option value was too large and was ignored.
>
>Any idea why?
>
>Thanks
>
>Ya
>
>
>SAS code:
>-------------------------------------------------------------------
>options orientation=portrait topmargin="1 in" bottommargin="1 in"
> leftmargin="1 in" rightmargin="1 in" nodate nonumber;
>
>title;
>
>ods listing close;
>ods pdf file="c:\temp\junk.pdf" style=minimal;
>
>ods layout start width=6.5in rows=3 row_heights=(2in 4in 2in)
>columns=2;
>
>ods region row=1 width=6.5in height=1in column_span=2;
>
>proc print data=sashelp.class (obs=5);
>run;
>
>ods region row=2 width=3in height=3in column=1;
>
>goptions reset=all device=sasprtc hsize=2in vsize=2in; proc gplot
>data=sashelp.class; plot weight*height; run; quit;
>
>ods region row=2 width=3in height=3in column=2;
>
>goptions reset=all device=sasprtc hsize=2in vsize=2in; proc gchart
>data=sashelp.class; vbar weight; run; quit;
>
>ods region row=3 height=1in column_span=2;
>
>proc print data=sashelp.class (obs=5);
>run;
>
>ods layout end;
>
>ods pdf close;