<?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: SGPLOT &amp; multiple lines per X-axis legend in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SGPLOT-multiple-lines-per-X-axis-legend/m-p/60437#M7213</link>
    <description>Here is a GTL example from a colleague that demonstrates how to create a "splitchar" axis.  The keys here are splitting the text in the datastep, turning off the axis tick values, and using a blockplot to render the text.&lt;BR /&gt;
&lt;BR /&gt;
proc template;&lt;BR /&gt;
define statgraph tickvaluewrap; &lt;BR /&gt;
begingraph  ;&lt;BR /&gt;
  layout lattice / column=1  rowgutter=0 rowweights=(.85 .15)&lt;BR /&gt;
                       columndatarange=union;&lt;BR /&gt;
    columnaxes;&lt;BR /&gt;
        columnaxis / offsetmin=.11 offsetmax=.11 display=none;&lt;BR /&gt;
    endcolumaxes;&lt;BR /&gt;
    barchart  x=question y=answer / ;&lt;BR /&gt;
    blockplot x=question block=line / class=n display=(values) valuehalign=center;&lt;BR /&gt;
  endlayout;&lt;BR /&gt;
endgraph;&lt;BR /&gt;
end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data survey;  &lt;BR /&gt;
  length line $20;&lt;BR /&gt;
  input Answer Question $3-70;&lt;BR /&gt;
  n=1; &lt;BR /&gt;
  line= scan(question,n,"~");&lt;BR /&gt;
  do while( lengthn(line) &amp;gt; 0 );   &lt;BR /&gt;
    output;&lt;BR /&gt;
    n+1; answer=.;&lt;BR /&gt;
    line= scan(question,n,"~");  &lt;BR /&gt;
  end;&lt;BR /&gt;
datalines;&lt;BR /&gt;
3 #1~How do you~feel today? &lt;BR /&gt;
4 #2~Would you be~willing to try this~again? &lt;BR /&gt;
2 #3~Is there some~way to get there~from here? &lt;BR /&gt;
5 #4~When do you~think this will~be finished,~today?&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc sgrender data=survey template=tickvaluewrap;&lt;BR /&gt;
run;</description>
    <pubDate>Tue, 04 Aug 2009 18:11:54 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2009-08-04T18:11:54Z</dc:date>
    <item>
      <title>SGPLOT &amp; multiple lines per X-axis legend</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SGPLOT-multiple-lines-per-X-axis-legend/m-p/60434#M7210</link>
      <description>Hello all;&lt;BR /&gt;
I am wondering if there is a "simple" way to "split" a legend marker so that:&lt;BR /&gt;
Jan07/MD=x/RN=x&lt;BR /&gt;
becomes&lt;BR /&gt;
&lt;BR /&gt;
Jan07&lt;BR /&gt;
MD=x&lt;BR /&gt;
RN=x&lt;BR /&gt;
&lt;BR /&gt;
I see the split function is available for other SAS graphing capabilities, just not SGPLOT.&lt;BR /&gt;
&lt;BR /&gt;
I have been poking around all the documentation for SGPLOT and Xaxis and not find much except for the graphics template language, which I am not ready to dive into just yet.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Much thanks! &lt;BR /&gt;
&lt;BR /&gt;
Lawrence</description>
      <pubDate>Thu, 30 Jul 2009 16:10:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SGPLOT-multiple-lines-per-X-axis-legend/m-p/60434#M7210</guid>
      <dc:creator>_LB</dc:creator>
      <dc:date>2009-07-30T16:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT &amp; multiple lines per X-axis legend</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SGPLOT-multiple-lines-per-X-axis-legend/m-p/60435#M7211</link>
      <description>Currently, there is not a way to create the SPLITCHAR functionality using the SG procedures.  There is a technique you can use in GTL to create this effect.  Let me know if you are interested.</description>
      <pubDate>Thu, 30 Jul 2009 16:31:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SGPLOT-multiple-lines-per-X-axis-legend/m-p/60435#M7211</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2009-07-30T16:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT &amp; multiple lines per X-axis legend</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SGPLOT-multiple-lines-per-X-axis-legend/m-p/60436#M7212</link>
      <description>Dan; &lt;BR /&gt;
Rats! Would be interested in knowing more about GTL.&lt;BR /&gt;
I have seen a couple of examples online so I will look there too.&lt;BR /&gt;
Thanks. &lt;BR /&gt;
&lt;BR /&gt;
Lawrence</description>
      <pubDate>Thu, 30 Jul 2009 16:33:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SGPLOT-multiple-lines-per-X-axis-legend/m-p/60436#M7212</guid>
      <dc:creator>_LB</dc:creator>
      <dc:date>2009-07-30T16:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT &amp; multiple lines per X-axis legend</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SGPLOT-multiple-lines-per-X-axis-legend/m-p/60437#M7213</link>
      <description>Here is a GTL example from a colleague that demonstrates how to create a "splitchar" axis.  The keys here are splitting the text in the datastep, turning off the axis tick values, and using a blockplot to render the text.&lt;BR /&gt;
&lt;BR /&gt;
proc template;&lt;BR /&gt;
define statgraph tickvaluewrap; &lt;BR /&gt;
begingraph  ;&lt;BR /&gt;
  layout lattice / column=1  rowgutter=0 rowweights=(.85 .15)&lt;BR /&gt;
                       columndatarange=union;&lt;BR /&gt;
    columnaxes;&lt;BR /&gt;
        columnaxis / offsetmin=.11 offsetmax=.11 display=none;&lt;BR /&gt;
    endcolumaxes;&lt;BR /&gt;
    barchart  x=question y=answer / ;&lt;BR /&gt;
    blockplot x=question block=line / class=n display=(values) valuehalign=center;&lt;BR /&gt;
  endlayout;&lt;BR /&gt;
endgraph;&lt;BR /&gt;
end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data survey;  &lt;BR /&gt;
  length line $20;&lt;BR /&gt;
  input Answer Question $3-70;&lt;BR /&gt;
  n=1; &lt;BR /&gt;
  line= scan(question,n,"~");&lt;BR /&gt;
  do while( lengthn(line) &amp;gt; 0 );   &lt;BR /&gt;
    output;&lt;BR /&gt;
    n+1; answer=.;&lt;BR /&gt;
    line= scan(question,n,"~");  &lt;BR /&gt;
  end;&lt;BR /&gt;
datalines;&lt;BR /&gt;
3 #1~How do you~feel today? &lt;BR /&gt;
4 #2~Would you be~willing to try this~again? &lt;BR /&gt;
2 #3~Is there some~way to get there~from here? &lt;BR /&gt;
5 #4~When do you~think this will~be finished,~today?&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc sgrender data=survey template=tickvaluewrap;&lt;BR /&gt;
run;</description>
      <pubDate>Tue, 04 Aug 2009 18:11:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SGPLOT-multiple-lines-per-X-axis-legend/m-p/60437#M7213</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2009-08-04T18:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT &amp; multiple lines per X-axis legend</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SGPLOT-multiple-lines-per-X-axis-legend/m-p/60438#M7214</link>
      <description>Dan;&lt;BR /&gt;
I'll take a look. Thanks for sharing this.&lt;BR /&gt;
~Lawrence</description>
      <pubDate>Fri, 14 Aug 2009 20:03:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SGPLOT-multiple-lines-per-X-axis-legend/m-p/60438#M7214</guid>
      <dc:creator>_LB</dc:creator>
      <dc:date>2009-08-14T20:03:53Z</dc:date>
    </item>
  </channel>
</rss>

