<?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: SGPANEL order in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-order/m-p/75068#M2790</link>
    <description>If you're comfortable with user-defined formats, you could assign numeric values to the "level", which would be used to control the order of the charts, and then have the user-defined format print those numeric values as the desired text (the charts will be ordered by the pre-formatted numeric values).&lt;BR /&gt;
&lt;BR /&gt;
Here is a variations of your code that demonstrates this:&lt;BR /&gt;
&lt;BR /&gt;
proc format;&lt;BR /&gt;
value my_fmt&lt;BR /&gt;
1 = "ZZZ"&lt;BR /&gt;
2 = "MMM"&lt;BR /&gt;
3 = "AAA"&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data to_plot;&lt;BR /&gt;
format level my_fmt.;&lt;BR /&gt;
input level time ratio;&lt;BR /&gt;
datalines;&lt;BR /&gt;
1 1 .2&lt;BR /&gt;
1 2 .25&lt;BR /&gt;
1 3 .33&lt;BR /&gt;
2 1 .6&lt;BR /&gt;
2 2 .55&lt;BR /&gt;
2 3 .67&lt;BR /&gt;
3 1 .11&lt;BR /&gt;
3 2 .22&lt;BR /&gt;
3 3 .25&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc sgpanel data=to_plot;&lt;BR /&gt;
panelby level/columns=1;&lt;BR /&gt;
vbar time/response=ratio datalabel ;&lt;BR /&gt;
format ratio percent.;&lt;BR /&gt;
run; &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
And, if you're really comfortable with user-defined formats, you can even create the format in a data-driven manner, using a "cntlin" data set.</description>
    <pubDate>Wed, 14 Apr 2010 14:29:02 GMT</pubDate>
    <dc:creator>GraphGuy</dc:creator>
    <dc:date>2010-04-14T14:29:02Z</dc:date>
    <item>
      <title>SGPANEL order</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-order/m-p/75065#M2787</link>
      <description>I am using the below code to drisplay 3 charts for the level variable.&lt;BR /&gt;
The procedure sorts the levels alphabetically. I want to force another order. Is there a way to do this?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
proc sgpanel data=to_plot;&lt;BR /&gt;
	panelby level/columns=1;&lt;BR /&gt;
	vbar time/response=ratio datalabel ;&lt;BR /&gt;
format ratio percent.;&lt;BR /&gt;
run;</description>
      <pubDate>Tue, 13 Apr 2010 15:38:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-order/m-p/75065#M2787</guid>
      <dc:creator>Jaime</dc:creator>
      <dc:date>2010-04-13T15:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: SGPANEL order</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-order/m-p/75066#M2788</link>
      <description>Suggest doing a Google advanced search against the SAS.COM support website - here is one that works quite well for this post:&lt;BR /&gt;
&lt;BR /&gt;
sgpanel panelby sort order site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 13 Apr 2010 15:42:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-order/m-p/75066#M2788</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-04-13T15:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: SGPANEL order</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-order/m-p/75067#M2789</link>
      <description>Scott, &lt;BR /&gt;
&lt;BR /&gt;
Thanks for your “Google it” suggestion. However, I was unable to find the answer I was looking for. Maybe I’m missing something.  &lt;BR /&gt;
I am trying to use proc format to order the panel outcome of the sgpanel. Similar to how you would use it to order a variable in proc report using a specific order. It’s not alphabetical nor numerical.&lt;BR /&gt;
&lt;BR /&gt;
Cheers.</description>
      <pubDate>Tue, 13 Apr 2010 16:49:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-order/m-p/75067#M2789</guid>
      <dc:creator>Jaime</dc:creator>
      <dc:date>2010-04-13T16:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: SGPANEL order</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-order/m-p/75068#M2790</link>
      <description>If you're comfortable with user-defined formats, you could assign numeric values to the "level", which would be used to control the order of the charts, and then have the user-defined format print those numeric values as the desired text (the charts will be ordered by the pre-formatted numeric values).&lt;BR /&gt;
&lt;BR /&gt;
Here is a variations of your code that demonstrates this:&lt;BR /&gt;
&lt;BR /&gt;
proc format;&lt;BR /&gt;
value my_fmt&lt;BR /&gt;
1 = "ZZZ"&lt;BR /&gt;
2 = "MMM"&lt;BR /&gt;
3 = "AAA"&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data to_plot;&lt;BR /&gt;
format level my_fmt.;&lt;BR /&gt;
input level time ratio;&lt;BR /&gt;
datalines;&lt;BR /&gt;
1 1 .2&lt;BR /&gt;
1 2 .25&lt;BR /&gt;
1 3 .33&lt;BR /&gt;
2 1 .6&lt;BR /&gt;
2 2 .55&lt;BR /&gt;
2 3 .67&lt;BR /&gt;
3 1 .11&lt;BR /&gt;
3 2 .22&lt;BR /&gt;
3 3 .25&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc sgpanel data=to_plot;&lt;BR /&gt;
panelby level/columns=1;&lt;BR /&gt;
vbar time/response=ratio datalabel ;&lt;BR /&gt;
format ratio percent.;&lt;BR /&gt;
run; &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
And, if you're really comfortable with user-defined formats, you can even create the format in a data-driven manner, using a "cntlin" data set.</description>
      <pubDate>Wed, 14 Apr 2010 14:29:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-order/m-p/75068#M2790</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2010-04-14T14:29:02Z</dc:date>
    </item>
  </channel>
</rss>

