<?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: side by side bars with SGPLOT in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47994#M1623</link>
    <description>this generates a number of errors &lt;BR /&gt;
&lt;BR /&gt;
for starters&lt;BR /&gt;
&lt;BR /&gt;
  rowAxisOpts=( offsetmin=0 display=all altdisplay=all linearOpts=( viewmin=0 ))&lt;BR /&gt;
                     ___________&lt;BR /&gt;
                     180&lt;BR /&gt;
42       ! columnAxisOpts=(type=Discrete display=all altdisplay=all)           row2AxisOpts=( offsetmin=0 display=all altdisplay=all&lt;BR /&gt;
42       !  linearOpts=( viewmin=0 ));      layout prototype / wallDisplay=(fill);         ReferenceLine y=0 /&lt;BR /&gt;
&lt;BR /&gt;
ERROR 180-322: Statement is not valid or it is used out of proper order.</description>
    <pubDate>Mon, 11 Apr 2011 19:38:37 GMT</pubDate>
    <dc:creator>wkossack</dc:creator>
    <dc:date>2011-04-11T19:38:37Z</dc:date>
    <item>
      <title>side by side bars with SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47984#M1613</link>
      <description>how can I get bars groups placed side by side with sgplot like you get from gplot&lt;BR /&gt;
&lt;BR /&gt;
PROC GCHART DATA=sumsboth; &lt;BR /&gt;
	VBAR Lag  / discrete TYPE=SUM SUMVAR=percent_success_both GROUP=year_quarter  ref=99 frontref cref=red&lt;BR /&gt;
	FRAME	&lt;BR /&gt;
	COUTLINE=BLACK&lt;BR /&gt;
	RAXIS=AXIS1&lt;BR /&gt;
	MAXIS=AXIS2&lt;BR /&gt;
PATTERNID=MIDPOINT  &lt;BR /&gt;
;</description>
      <pubDate>Mon, 11 Apr 2011 15:04:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47984#M1613</guid>
      <dc:creator>wkossack</dc:creator>
      <dc:date>2011-04-11T15:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: side by side bars with SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47985#M1614</link>
      <description>For SAS 9.2, you have to be a little creative. For SAS 9.3, there will be an option to get side-by-side groups in SGPLOT. In the meantime, try this example below. Your group variable will go on the PANELBY statement. There are other options on the PANELBY statement to move the column headings (columnheaderpos) and to remove the label part of the column heading (novarlabel).&lt;BR /&gt;
&lt;BR /&gt;
Hope this helps,&lt;BR /&gt;
Dan&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc sgpanel data=sashelp.class;&lt;BR /&gt;
panelby sex / layout=columnlattice onepanel noborder;&lt;BR /&gt;
vbar age / response=height;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Mon, 11 Apr 2011 15:16:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47985#M1614</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2011-04-11T15:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: side by side bars with SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47986#M1615</link>
      <description>close except for a couple things&lt;BR /&gt;
&lt;BR /&gt;
my value for year_quarter is truncated to just 20&lt;BR /&gt;
&lt;BR /&gt;
also they want the vertical scale adjusted as &lt;BR /&gt;
yaxis values=(90 91 93 94 95 96 97 98 100); &lt;BR /&gt;
would affect the scale with sgplot&lt;BR /&gt;
&lt;BR /&gt;
I don't see any way of doing that with sgplanel&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: wkossack

Message was edited by: wkossack</description>
      <pubDate>Mon, 11 Apr 2011 15:49:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47986#M1615</guid>
      <dc:creator>wkossack</dc:creator>
      <dc:date>2011-04-11T15:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: side by side bars with SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47987#M1616</link>
      <description>The VALUES option can be specified on the ROWAXIS statement to control the scaling of the vertical axis. Was the trucation on the axis or the column headings?</description>
      <pubDate>Mon, 11 Apr 2011 16:31:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47987#M1616</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2011-04-11T16:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: side by side bars with SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47988#M1617</link>
      <description>column headings. &lt;BR /&gt;
&lt;BR /&gt;
I think there is not enough space.  I looked up the ROWAXIS.  All I really need is for the value to be displayed not the variable name i.e. 2010_Q1 not year_quarter = 2010_Q1</description>
      <pubDate>Mon, 11 Apr 2011 16:37:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47988#M1617</guid>
      <dc:creator>wkossack</dc:creator>
      <dc:date>2011-04-11T16:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: side by side bars with SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47989#M1618</link>
      <description>Use the NOVARNAME option on the PANELBY statement to get rid of the variable label.</description>
      <pubDate>Mon, 11 Apr 2011 16:41:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47989#M1618</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2011-04-11T16:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: side by side bars with SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47990#M1619</link>
      <description>OK that worked but I have not gotten colaxis to work&lt;BR /&gt;
&lt;BR /&gt;
I'm using&lt;BR /&gt;
&lt;BR /&gt;
COLAXIS values=(90 to 100 by 1) ;</description>
      <pubDate>Mon, 11 Apr 2011 18:03:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47990#M1619</guid>
      <dc:creator>wkossack</dc:creator>
      <dc:date>2011-04-11T18:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: side by side bars with SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47991#M1620</link>
      <description>You need to use the ROWAXIS statement instead of the COLAXIS statement. The row axes are the vertical axes and and the column axes are the horizontal axes.&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;BR /&gt;
Dan</description>
      <pubDate>Mon, 11 Apr 2011 18:05:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47991#M1620</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2011-04-11T18:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: side by side bars with SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47992#M1621</link>
      <description>Arg....should have realized that&lt;BR /&gt;
&lt;BR /&gt;
is there any way I can overlay a line plot with sgpanel?&lt;BR /&gt;
&lt;BR /&gt;
I have another variable I want to overlay with an additional vertical axis.  For example, my bars are the percent error but I want to overlay a line that is the sample size</description>
      <pubDate>Mon, 11 Apr 2011 18:22:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47992#M1621</guid>
      <dc:creator>wkossack</dc:creator>
      <dc:date>2011-04-11T18:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: side by side bars with SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47993#M1622</link>
      <description>You can overlay a VLINE chart on the VBAR chart; however, we do not currently support secondary axes for SGPANEL. For the time being, you can use GTL to do it. Here is an example:&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc template;&lt;BR /&gt;
define statgraph barline;&lt;BR /&gt;
begingraph /;&lt;BR /&gt;
layout gridded / rowgutter=5;&lt;BR /&gt;
   layout datalattice columnvar=Sex / includeMissingClass=false rowDataRange=unionall columnDataRange=unionall rows=1 &lt;BR /&gt;
          rowAxisOpts=( offsetmin=0 display=all altdisplay=all linearOpts=( viewmin=0 )) &lt;BR /&gt;
          columnAxisOpts=(type=Discrete display=all altdisplay=all) &lt;BR /&gt;
          row2AxisOpts=( offsetmin=0 display=all altdisplay=all linearOpts=( viewmin=0 ));&lt;BR /&gt;
      layout prototype / wallDisplay=(fill);&lt;BR /&gt;
         ReferenceLine y=0 / lineattrs=GraphAxisLines;&lt;BR /&gt;
         BarChart X=Age Y=Height / primary=true LegendLabel="Height" NAME="VBAR";&lt;BR /&gt;
         SeriesPlot X=Age Y=Weight / LegendLabel="Weight" yaxis=y2 NAME="VLINE";&lt;BR /&gt;
      endlayout;&lt;BR /&gt;
   endlayout;&lt;BR /&gt;
   DiscreteLegend "VBAR" "VLINE";&lt;BR /&gt;
endlayout;&lt;BR /&gt;
endgraph;&lt;BR /&gt;
end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc summary data=sashelp.class nway;&lt;BR /&gt;
class sex age;&lt;BR /&gt;
var weight height;&lt;BR /&gt;
output out=temp mean=;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc sgrender data=temp template=barline; run;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Mon, 11 Apr 2011 18:49:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47993#M1622</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2011-04-11T18:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: side by side bars with SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47994#M1623</link>
      <description>this generates a number of errors &lt;BR /&gt;
&lt;BR /&gt;
for starters&lt;BR /&gt;
&lt;BR /&gt;
  rowAxisOpts=( offsetmin=0 display=all altdisplay=all linearOpts=( viewmin=0 ))&lt;BR /&gt;
                     ___________&lt;BR /&gt;
                     180&lt;BR /&gt;
42       ! columnAxisOpts=(type=Discrete display=all altdisplay=all)           row2AxisOpts=( offsetmin=0 display=all altdisplay=all&lt;BR /&gt;
42       !  linearOpts=( viewmin=0 ));      layout prototype / wallDisplay=(fill);         ReferenceLine y=0 /&lt;BR /&gt;
&lt;BR /&gt;
ERROR 180-322: Statement is not valid or it is used out of proper order.</description>
      <pubDate>Mon, 11 Apr 2011 19:38:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47994#M1623</guid>
      <dc:creator>wkossack</dc:creator>
      <dc:date>2011-04-11T19:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: side by side bars with SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47995#M1624</link>
      <description>Secondary axis support for DATALATTICE was added in SAS 9.2m3. What version of SAS 9.2 do you have?</description>
      <pubDate>Mon, 11 Apr 2011 19:53:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47995#M1624</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2011-04-11T19:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: side by side bars with SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47996#M1625</link>
      <description>EG 4.2</description>
      <pubDate>Mon, 11 Apr 2011 20:00:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47996#M1625</guid>
      <dc:creator>wkossack</dc:creator>
      <dc:date>2011-04-11T20:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: side by side bars with SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47997#M1626</link>
      <description>ah there it is 9.2M1</description>
      <pubDate>Mon, 11 Apr 2011 20:01:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/side-by-side-bars-with-SGPLOT/m-p/47997#M1626</guid>
      <dc:creator>wkossack</dc:creator>
      <dc:date>2011-04-11T20:01:37Z</dc:date>
    </item>
  </channel>
</rss>

