<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Help with SAS Graph in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70167#M2467</link>
    <description>When you say, "unable to use proc template in EG", what kind of problems are you seeing? Is there an template store writing issue, or is there a compile issue with the template code?&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;BR /&gt;
Dan</description>
    <pubDate>Tue, 31 May 2011 21:39:05 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2011-05-31T21:39:05Z</dc:date>
    <item>
      <title>Help with SAS Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70159#M2459</link>
      <description>Guys - &lt;BR /&gt;
&lt;BR /&gt;
I am a complete novice to SAS Code as i use SAS EG. I was recommended to use SAS Code for the following task;&lt;BR /&gt;
&lt;BR /&gt;
I want to create a SAS Graph with three variables; say two bars and one line, or two lines and a bar.&lt;BR /&gt;
&lt;BR /&gt;
Can this be done using SAS Code?&lt;BR /&gt;
&lt;BR /&gt;
Any help/advise would be appreciated,&lt;BR /&gt;
&lt;BR /&gt;
Thanks,</description>
      <pubDate>Thu, 26 May 2011 15:32:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70159#M2459</guid>
      <dc:creator>ace2011</dc:creator>
      <dc:date>2011-05-26T15:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAS Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70160#M2460</link>
      <description>SGPLOT may be a good place to look.  Is this what you are trying to do?&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/grstatproc/62603/HTML/default/a003199396.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/grstatproc/62603/HTML/default/a003199396.htm&lt;/A&gt;</description>
      <pubDate>Thu, 26 May 2011 15:38:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70160#M2460</guid>
      <dc:creator>RickM</dc:creator>
      <dc:date>2011-05-26T15:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAS Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70161#M2461</link>
      <description>Also see the programs I posted to this thread:&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?threadID=14351&amp;amp;tstart=0" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?threadID=14351&amp;amp;tstart=0&lt;/A&gt;</description>
      <pubDate>Thu, 26 May 2011 15:44:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70161#M2461</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2011-05-26T15:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAS Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70162#M2462</link>
      <description>You might also look into "proc gbarline" for simple bar charts (ie, not grouped/paired bars) with lines overlaid.&lt;BR /&gt;
&lt;BR /&gt;
For both gbarline, and sgplot, you'll need a fairly recent version of SAS - I would recommend using the most recent version, as both of these fairly new procs had a lot of enhancements in 9.2.</description>
      <pubDate>Thu, 26 May 2011 15:49:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70162#M2462</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2011-05-26T15:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAS Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70163#M2463</link>
      <description>If you have SAS 9.2(TS2M3), you can use the ODS Graphics Designer to create your graphs without knowing anything about SAS/GRAPH.  This will also work for pre M3 version, but it is pre-production.&lt;BR /&gt;
&lt;BR /&gt;
Submit %sgdesign; in the program window to start Designer.  Then, start with a graph from the gallery, and supply your data.  You can add more bars or series to the graph incrementally.  See this link to get started:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/resources/papers/proceedings09/331-2009.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings09/331-2009.pdf&lt;/A&gt;</description>
      <pubDate>Thu, 26 May 2011 15:52:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70163#M2463</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2011-05-26T15:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAS Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70164#M2464</link>
      <description>Rick - &lt;BR /&gt;
&lt;BR /&gt;
yes this is what i am trying to do in essence - but two bars and one line.&lt;BR /&gt;
&lt;BR /&gt;
I will look over the code,&lt;BR /&gt;
&lt;BR /&gt;
Thanks,</description>
      <pubDate>Thu, 26 May 2011 17:04:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70164#M2464</guid>
      <dc:creator>ace2011</dc:creator>
      <dc:date>2011-05-26T17:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAS Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70165#M2465</link>
      <description>One way to do 2 bars (aka,  a "grouped bar chart") and a line is to use "proc gchart" to draw the bars, and use "annotate" to draw the line (this requires intermediate, to advanced, programming).  Here's a minimal/simple example:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://robslink.com/SAS/democd29/barline.htm" target="_blank"&gt;http://robslink.com/SAS/democd29/barline.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://robslink.com/SAS/democd29/barline_info.htm" target="_blank"&gt;http://robslink.com/SAS/democd29/barline_info.htm&lt;/A&gt;</description>
      <pubDate>Thu, 26 May 2011 17:28:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70165#M2465</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2011-05-26T17:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAS Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70166#M2466</link>
      <description>Sanjay - &lt;BR /&gt;
&lt;BR /&gt;
I tried using the code you have mentioned in the other thread - but since i am using SAS Enterprise Guide, I am unable to use proc template with SAS Enterprise Guide.&lt;BR /&gt;
&lt;BR /&gt;
Is there a way i can counter this?&lt;BR /&gt;
&lt;BR /&gt;
Thank you for your assistance,&lt;BR /&gt;
&lt;BR /&gt;
Best Regards,&lt;BR /&gt;
Abhinav</description>
      <pubDate>Tue, 31 May 2011 20:56:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70166#M2466</guid>
      <dc:creator>ace2011</dc:creator>
      <dc:date>2011-05-31T20:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAS Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70167#M2467</link>
      <description>When you say, "unable to use proc template in EG", what kind of problems are you seeing? Is there an template store writing issue, or is there a compile issue with the template code?&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;BR /&gt;
Dan</description>
      <pubDate>Tue, 31 May 2011 21:39:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70167#M2467</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2011-05-31T21:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAS Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70168#M2468</link>
      <description>It says nothing - it displays the table but will not show the graph at all.&lt;BR /&gt;
&lt;BR /&gt;
I can not link the code to my stored process in Enterprise Guide.&lt;BR /&gt;
&lt;BR /&gt;
I had a quick call with a SAS Customer Support Representative and he mentioned that proc template can not be used in SAS Enterprise Guide.</description>
      <pubDate>Tue, 31 May 2011 21:43:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70168#M2468</guid>
      <dc:creator>ace2011</dc:creator>
      <dc:date>2011-05-31T21:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAS Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70169#M2469</link>
      <description>Do you see any messages in the log from the stored process? If it is a template store writing issue, I think we can work around that. If that is the problem, you will see a message to that effect in the log.</description>
      <pubDate>Tue, 31 May 2011 21:49:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70169#M2469</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2011-05-31T21:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAS Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70170#M2470</link>
      <description>Try this in your stored process:&lt;BR /&gt;
&lt;BR /&gt;
1. At the beginning, add this line: ods path (prepend) work.templat(update);&lt;BR /&gt;
2. In the proc template code, where it say DEFINE STATGRAPH &lt;TEMPLATENAME&gt;;&lt;BR /&gt;
    add this: / store=work.templat;&lt;BR /&gt;
3. At the end, add this line: ods path reset;&lt;BR /&gt;
&lt;BR /&gt;
Let me know if that works for you.&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;BR /&gt;
Dan&lt;/TEMPLATENAME&gt;</description>
      <pubDate>Tue, 31 May 2011 21:59:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70170#M2470</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2011-05-31T21:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAS Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70171#M2471</link>
      <description>Dan - &lt;BR /&gt;
&lt;BR /&gt;
Thank you for the reply.&lt;BR /&gt;
&lt;BR /&gt;
Just to give a quick background - i have a Stored process where i want to graph two variables on a graph and one on a line. When i query up the data sets, and have the ouptput data set which i want to graph in said format, i insert code in there&lt;BR /&gt;
&lt;BR /&gt;
and it gives me the following errors; I am pasting the whole log here - apologies on the long post;&lt;BR /&gt;
&lt;BR /&gt;
1                                           The SAS System                 16:25 Tuesday, May 31, 2011&lt;BR /&gt;
&lt;BR /&gt;
1          ;*';*";*/;quit;run;&lt;BR /&gt;
2          OPTIONS PAGENO=MIN;&lt;BR /&gt;
3          %LET _CLIENTTASKLABEL='Program';&lt;BR /&gt;
4          %LET _CLIENTPROJECTPATH='/Libraries/SASLibraries/AceTest/edited Workquery&lt;BR /&gt;
4        ! Ace SAS Graph.egp';&lt;BR /&gt;
5          %LET _CLIENTPROJECTNAME='Edited edited Workquery Ace SAS Graph.egp';&lt;BR /&gt;
6          %LET _SASPROGRAMFILE=;&lt;BR /&gt;
7          &lt;BR /&gt;
8          ODS _ALL_ CLOSE;&lt;BR /&gt;
9          OPTIONS DEV=ACTIVEX;&lt;BR /&gt;
NOTE: Procedures may not support all options or statements for all devices. For details, see the &lt;BR /&gt;
      documentation for each procedure.&lt;BR /&gt;
10         GOPTIONS XPIXELS=0 YPIXELS=0;&lt;BR /&gt;
11         FILENAME EGSR TEMP;&lt;BR /&gt;
12         ODS tagsets.sasreport12(ID=EGSR) FILE=EGSR STYLE=Copy_of_Analysis&lt;BR /&gt;
12       ! STYLESHEET=(URL="file:///C:/Documents%20and%20Settings/ace/Desktop/Copy%20of%20Analysis.cs&lt;BR /&gt;
12       ! s") NOGTITLE NOGFOOTNOTE GPATH=&amp;amp;sasworklocation ENCODING=UTF8 options(rolap="on");&lt;BR /&gt;
WARNING: Style COPY_OF_ANALYSIS not found; Default style will be used instead.&lt;BR /&gt;
NOTE: Writing TAGSETS.SASREPORT12(EGSR) Body file: EGSR&lt;BR /&gt;
13         &lt;BR /&gt;
14         GOPTIONS ACCESSIBLE;&lt;BR /&gt;
15         &lt;BR /&gt;
16         /* -------------------------------------------------------------------&lt;BR /&gt;
17            Code generated by SAS Task&lt;BR /&gt;
18         &lt;BR /&gt;
19            Generated on: Tuesday, May 31, 2011 at 3:07:11 PM&lt;BR /&gt;
20            By task: Test graph&lt;BR /&gt;
21         &lt;BR /&gt;
22            Input Data: WORK.QUERY_FOR_COMBINED_FILE_DUM_0015&lt;BR /&gt;
23            Server:  SASApp&lt;BR /&gt;
24            ------------------------------------------------------------------- */&lt;BR /&gt;
25         &lt;BR /&gt;
26         %_eg_conditional_dropds(WORK.SORTTempTableSorted);&lt;BR /&gt;
27         /* -------------------------------------------------------------------&lt;BR /&gt;
28            Sort data set WORK.QUERY_FOR_COMBINED_FILE_DUM_0015&lt;BR /&gt;
29            ------------------------------------------------------------------- */&lt;BR /&gt;
30         &lt;BR /&gt;
31         &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
32         data WORK.QUERY_FOR_COMBINED_FILE_DUM_0015;&lt;BR /&gt;
33         input month $ Calculation2 metric_b SUM_of_random;&lt;BR /&gt;
34         datalines;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: The data set WORK.QUERY_FOR_COMBINED_FILE_DUM_0015 has 5 observations and 4 variables.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.00 seconds&lt;BR /&gt;
      cpu time            0.00 seconds&lt;BR /&gt;
      &lt;BR /&gt;
40         ;&lt;BR /&gt;
&lt;BR /&gt;
41         run;&lt;BR /&gt;
42         proc template;&lt;BR /&gt;
43         define statgraph bars;&lt;BR /&gt;
2                                           The SAS System                 16:25 Tuesday, May 31, 2011&lt;BR /&gt;
&lt;BR /&gt;
44         begingraph;&lt;BR /&gt;
45         entrytitle "test three Variable Graph";&lt;BR /&gt;
46         layout overlay / yaxisopts=(offsetmin=0);&lt;BR /&gt;
47         barchart x=month y=Calculation2 / discreteoffset=-0.2 barwidth=0.4 fillattrs=graphdata1&lt;BR /&gt;
47       ! name='a';&lt;BR /&gt;
48         barchart x=month y=metric_b / discreteoffset= 0.2 barwidth=0.4 fillattrs=graphdata2 name='b';&lt;BR /&gt;
49         seriesplot x=age y=SUM_of_random / lineattrs=graphdata3(pattern=solid thickness=4)&lt;BR /&gt;
49       ! yaxis=y2 name='c';&lt;BR /&gt;
50         discretelegend 'a' 'b' 'c';&lt;BR /&gt;
51         endlayout;&lt;BR /&gt;
52         endgraph;a&lt;BR /&gt;
                    _&lt;BR /&gt;
                    180&lt;BR /&gt;
ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;BR /&gt;
53         end;&lt;BR /&gt;
54         run;&lt;BR /&gt;
NOTE: PROCEDURE TEMPLATE used (Total process time):&lt;BR /&gt;
      real time           0.00 seconds&lt;BR /&gt;
      cpu time            0.00 seconds&lt;BR /&gt;
      &lt;BR /&gt;
ERROR: Parse environments were left open. You may be missing an END statement.&lt;BR /&gt;
NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;
55         &lt;BR /&gt;
56         ods graphics / width=4in height=3in imagename='BarsGTL';&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
57         proc sgrender data=WORK.QUERY_FOR_COMBINED_FILE_DUM_0015 template=bars;&lt;BR /&gt;
58         run;&lt;BR /&gt;
&lt;BR /&gt;
ERROR: Unable to restore 'bars' from template store!&lt;BR /&gt;
NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;
NOTE: There were 5 observations read from the data set WORK.QUERY_FOR_COMBINED_FILE_DUM_0015.&lt;BR /&gt;
NOTE: PROCEDURE SGRENDER used (Total process time):&lt;BR /&gt;
      real time           0.00 seconds&lt;BR /&gt;
      cpu time            0.00 seconds&lt;BR /&gt;
      &lt;BR /&gt;
59         &lt;BR /&gt;
60         &lt;BR /&gt;
61         &lt;BR /&gt;
62         GOPTIONS NOACCESSIBLE;&lt;BR /&gt;
63         %LET _CLIENTTASKLABEL=;&lt;BR /&gt;
64         %LET _CLIENTPROJECTPATH=;&lt;BR /&gt;
65         %LET _CLIENTPROJECTNAME=;&lt;BR /&gt;
66         %LET _SASPROGRAMFILE=;&lt;BR /&gt;
67         &lt;BR /&gt;
68         ;*';*";*/;quit;run;&lt;BR /&gt;
69         ODS _ALL_ CLOSE;&lt;BR /&gt;
70         &lt;BR /&gt;
71         &lt;BR /&gt;
72         QUIT; RUN;&lt;BR /&gt;
73</description>
      <pubDate>Tue, 31 May 2011 22:03:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70171#M2471</guid>
      <dc:creator>ace2011</dc:creator>
      <dc:date>2011-05-31T22:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAS Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70172#M2472</link>
      <description>I believe your problem is on line 52.  There is a stray 'a' there.&lt;BR /&gt;
This prevents the 'end' from being recognized on line 53.&lt;BR /&gt;
&lt;BR /&gt;
52 endgraph;a&lt;BR /&gt;
_&lt;BR /&gt;
180&lt;BR /&gt;
ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;BR /&gt;
53 end;</description>
      <pubDate>Wed, 01 Jun 2011 12:26:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70172#M2472</guid>
      <dc:creator>Darrell_sas</dc:creator>
      <dc:date>2011-06-01T12:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAS Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70173#M2473</link>
      <description>Darrell - &lt;BR /&gt;
&lt;BR /&gt;
Yeah that was it - thanks a ton for your help on this thread guys.&lt;BR /&gt;
&lt;BR /&gt;
Thank you,</description>
      <pubDate>Wed, 01 Jun 2011 13:35:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Help-with-SAS-Graph/m-p/70173#M2473</guid>
      <dc:creator>ace2011</dc:creator>
      <dc:date>2011-06-01T13:35:54Z</dc:date>
    </item>
  </channel>
</rss>

