<?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: sgrender in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/sgrender/m-p/707572#M20830</link>
    <description>&lt;P&gt;Using a GTL example, I think you need to use Layout DataPanel, but I'm assuming that you want your variable PLAT to change and be another value later.&amp;nbsp; Or maybe, because I might misunderstand what you want.&amp;nbsp; You might just a where statement in PROC SGRENDER.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using: &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=grstatgraph&amp;amp;docsetTarget=n0xhh0203fgmhpn1527ditpuzlf1.htm&amp;amp;locale=en#n05nptygae1eq0n1dupr1jicuc34%23n05nptygae1eq0n1dupr1jicuc34" target="_self"&gt;Example: | SAS Help Center: LAYOUT DATAPANEL Statement&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here I've changed the template in the example to put one graph in the window then I select individual values of the "classvars" country and year in the where statement of PROC SGRENDER.&amp;nbsp; This obviously doesn't look as nice as what you've set up with your text boxes, but -anyway- this is what I have experience with.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;proc template;
 define statgraph layoutdatapanel;
  begingraph;
    entrytitle "Annual Furniture Sales Comparisons";    
    layout datapanel classvars=(country year) / 
/*      columns=4 rows=3 rowdatarange=union*/
      columns=1 rows=1 rowdatarange=union
      headerlabeldisplay=value 
      headerbackgroundcolor=GraphAltBlock:color
      rowaxisopts=(display=(tickvalues) griddisplay=on
        linearopts=(tickvalueformat=dollar12.))
      columnaxisopts=(display=(tickvalues)  
        timeopts=(tickvalueformat=monname3.));
      layout prototype / cycleattrs=true;
        seriesplot x=month y=TotalActual / name="Actual";
        seriesplot x=month y=TotalPredict / name="Predict";		   
      endlayout;
      sidebar / align=top;        
        discretelegend "Actual" "Predict" / border=false;
      endsidebar;
    endlayout;
  endgraph;
 end;
run;

proc summary data=sashelp.prdsal2 nway;
  class country year month;
  var actual predict;
  output out=prdsal2 sum=TotalActual TotalPredict;
run;

proc sgrender data=prdsal2 template=layoutdatapanel;
  where country="U.S.A." AND year=1995;
run;
proc sgrender data=prdsal2 template=layoutdatapanel;
  where country="Canada" AND year=1996;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Dec 2020 16:35:33 GMT</pubDate>
    <dc:creator>PhilC</dc:creator>
    <dc:date>2020-12-22T16:35:33Z</dc:date>
    <item>
      <title>sgrender</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgrender/m-p/707543#M20829</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Can anyone help me to figure out following issue.&lt;/P&gt;&lt;P&gt;I am trying to call variable(variable name is PLAT and its value is 192 in dataset) in proc template&amp;nbsp; using&amp;nbsp; LAYOUT GRIDDED / columns=2 rows=2 border=true autoalign=(topleft topright bottomleft bottomright);&lt;/P&gt;&lt;P&gt;entry halign left ' Baseline Platlet count';&lt;/P&gt;&lt;P&gt;entry halign left PLAT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and wants to display its value on the graph.&lt;/P&gt;&lt;P&gt;But some reason i am not able to populate its value on graph, instead it populates label and value i applied&amp;nbsp; in quotation marks&amp;nbsp; in proc sgrender.&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;proc sgrender data=new template=Product1; dynamic PLAT ="PLAT" varlable="Baseline Platlet count="; by subjid;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In sort i am trying to populate "192" instead of "PLAT" in graph.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sgplot.PNG" style="width: 849px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/52942iF1EC84B046DFD502/image-size/large?v=v2&amp;amp;px=999" role="button" title="sgplot.PNG" alt="sgplot.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sg_data.PNG" style="width: 290px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/52944i8D2CA30C1FD23AB2/image-size/large?v=v2&amp;amp;px=999" role="button" title="sg_data.PNG" alt="sg_data.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
define statgraph Product1;
dynamic PLAT  ;
BeginGraph /designwidth=800 designheight=400px ;

      layout lattice / rows=1 rowweights=(0.75 0.17 0.08) columns=1 columnDataRange=unionall;

    layout overlay /
	
  yaxisopts=(griddisplay=on /*label="Analysis value" */ ) 
  xaxisopts=(griddisplay=on display=(ticks tickvalues label) label='VISIT' offsetmin=.05 offsetmax=.05 
              linearopts=(viewmin=0 viewmax=81 ))
  x2axisopts=(griddisplay=on display= none  offsetmin=.05 offsetmax=.05 
              linearopts=(viewmin=0 viewmax=81 ));

        layout gridded / columns=2 rows=2  border=true autoalign=(topleft topright bottomleft bottomright);
			  /*- Line 4 -*/
          entry textattrs=(size=10) halign=left "Baseline Platlet count=";
          entry halign=left PLAT;
		  endlayout;

	  seriesplot y=aval x=avisit /  lineattrs=(thickness=2.5 color=black PATTERN=1) name="STEP";
	   discretelegend "STEP" / location=outside;
	   scatterplot y=aval x=avisit /markerattrs=(size=8 color=black symbol=circlefilled transparency = .05) ;
    scatterplot y=aval2 x=avisit_1 /markerattrs=(size=8 color=red symbol=triangle transparency = .05) xaxis=x2;


endlayout;
   endlayout;
   EndGraph;
end;
run;

proc sgrender data=new  template=Product1;
  dynamic PLAT ="PLAT" varlable="Baseline Platlet count=";
by subjid;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any help will be appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 17:56:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgrender/m-p/707543#M20829</guid>
      <dc:creator>unnati</dc:creator>
      <dc:date>2020-12-21T17:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: sgrender</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgrender/m-p/707572#M20830</link>
      <description>&lt;P&gt;Using a GTL example, I think you need to use Layout DataPanel, but I'm assuming that you want your variable PLAT to change and be another value later.&amp;nbsp; Or maybe, because I might misunderstand what you want.&amp;nbsp; You might just a where statement in PROC SGRENDER.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using: &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=grstatgraph&amp;amp;docsetTarget=n0xhh0203fgmhpn1527ditpuzlf1.htm&amp;amp;locale=en#n05nptygae1eq0n1dupr1jicuc34%23n05nptygae1eq0n1dupr1jicuc34" target="_self"&gt;Example: | SAS Help Center: LAYOUT DATAPANEL Statement&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here I've changed the template in the example to put one graph in the window then I select individual values of the "classvars" country and year in the where statement of PROC SGRENDER.&amp;nbsp; This obviously doesn't look as nice as what you've set up with your text boxes, but -anyway- this is what I have experience with.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;proc template;
 define statgraph layoutdatapanel;
  begingraph;
    entrytitle "Annual Furniture Sales Comparisons";    
    layout datapanel classvars=(country year) / 
/*      columns=4 rows=3 rowdatarange=union*/
      columns=1 rows=1 rowdatarange=union
      headerlabeldisplay=value 
      headerbackgroundcolor=GraphAltBlock:color
      rowaxisopts=(display=(tickvalues) griddisplay=on
        linearopts=(tickvalueformat=dollar12.))
      columnaxisopts=(display=(tickvalues)  
        timeopts=(tickvalueformat=monname3.));
      layout prototype / cycleattrs=true;
        seriesplot x=month y=TotalActual / name="Actual";
        seriesplot x=month y=TotalPredict / name="Predict";		   
      endlayout;
      sidebar / align=top;        
        discretelegend "Actual" "Predict" / border=false;
      endsidebar;
    endlayout;
  endgraph;
 end;
run;

proc summary data=sashelp.prdsal2 nway;
  class country year month;
  var actual predict;
  output out=prdsal2 sum=TotalActual TotalPredict;
run;

proc sgrender data=prdsal2 template=layoutdatapanel;
  where country="U.S.A." AND year=1995;
run;
proc sgrender data=prdsal2 template=layoutdatapanel;
  where country="Canada" AND year=1996;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 16:35:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgrender/m-p/707572#M20830</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2020-12-22T16:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: sgrender</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgrender/m-p/707578#M20831</link>
      <description />
      <pubDate>Tue, 22 Dec 2020 16:29:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgrender/m-p/707578#M20831</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2020-12-22T16:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: sgrender</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgrender/m-p/707699#M20832</link>
      <description>&lt;P&gt;OK, use:&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;CODE class=" language-sas"&gt;layout datapanel classvars=(country year)&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;where country year is your "PLAT".&amp;nbsp; With:&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;HEADERLABELDISPLAY=NONE
INSET=(country year)
INSETOPTS=(CONTENTDISPLAY=LABELVALUE HALIGN=LEFT SEPARATOR="=")
columns=1 rows=1 rowdatarange=union&lt;/LI-CODE&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
 define statgraph layoutdatapanel;
  begingraph;
    entrytitle "Annual Furniture Sales Comparisons";    
    layout datapanel classvars=(country year) / 
/*      columns=4 rows=3 rowdatarange=union*/
      /**********************/
      HEADERLABELDISPLAY=NONE
      INSET=(country year)
      INSETOPTS=(CONTENTDISPLAY=LABELVALUE HALIGN=LEFT SEPARATOR="=")
      columns=1 rows=1 
      /**********************/&lt;BR /&gt;      rowdatarange=union
/*      headerlabeldisplay=value */
      headerbackgroundcolor=GraphAltBlock:color
      rowaxisopts=(display=(tickvalues) griddisplay=on
        linearopts=(tickvalueformat=dollar12.))
      columnaxisopts=(display=(tickvalues)  
        timeopts=(tickvalueformat=monname3.));
      layout prototype / cycleattrs=true;
        seriesplot x=month y=TotalActual / name="Actual";
        seriesplot x=month y=TotalPredict / name="Predict";		   
      endlayout;
      sidebar / align=top;        
        discretelegend "Actual" "Predict" / border=false;
      endsidebar;
    endlayout;
  endgraph;
 end;
run;

proc summary data=sashelp.prdsal2 nway;
  class country year month;
  var actual predict;
  output out=prdsal2 sum=TotalActual TotalPredict;
run;

proc sgrender data=prdsal2 template=layoutdatapanel;
  where country="U.S.A." AND year=1995;
run;
proc sgrender data=prdsal2 template=layoutdatapanel;
  where country="Canada" AND year=1996;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 16:27:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgrender/m-p/707699#M20832</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2020-12-22T16:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: sgrender</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgrender/m-p/708012#M20833</link>
      <description>&lt;P&gt;Is there any reason in particular you are wanting to use SGrender, rather than SGplot?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Dec 2020 22:26:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgrender/m-p/708012#M20833</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2020-12-23T22:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: sgrender</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgrender/m-p/708101#M20835</link>
      <description>&lt;P&gt;I have to create graph for each subject separately and it has to have its associated value of its PLAT count from that particular subject. So if i use Sgrender procedure with by statement i can create one PDF file for all subject.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Dec 2020 16:15:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgrender/m-p/708101#M20835</guid>
      <dc:creator>unnati</dc:creator>
      <dc:date>2020-12-24T16:15:42Z</dc:date>
    </item>
  </channel>
</rss>

