<?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: Gchart - Axis: How to generate Gchart by Descending Order base on a statistical variable, but it should meet the flexible and automatical stepping method like it does by default Ascending way? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-Axis-How-to-generate-Gchart-by-Descending-Order-base-on-a/m-p/80599#M2990</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Yuanbin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe what is happening here is that your ORDER option is excluding your data. Even when you use "by 4", you could be loosing data, unless the bins happen to fall in "by 4" increments. When you use "by 3", the exclusion pattern becomes different. In general, it is not good to use the ORDER option for categorical axes. You should use the MIDPOINTS option on the HBAR statement to set the bins, e.g. midpoints=(2700 to 2580 by -3).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Mar 2013 13:41:42 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2013-03-21T13:41:42Z</dc:date>
    <item>
      <title>Gchart - Axis: How to generate Gchart by Descending Order base on a statistical variable, but it should meet the flexible and automatical stepping method like it does by default Ascending way?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-Axis-How-to-generate-Gchart-by-Descending-Order-base-on-a/m-p/80596#M2987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When Gchart produce picture by default ascending order, the output is nice as below:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="3232" alt="Samples_chart_esc.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/3232_Samples_chart_esc.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I changed the order by desending way with ORDER = definition, for example, ORDER=(2700 to 2580 by -4&amp;nbsp; ) it works well as such:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="3233" alt="Samples_chart_desc.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/3233_Samples_chart_desc.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;However, if we changed the value of step from 4 to 3, as here&amp;nbsp; ORDER=(2700 to 2580&lt;SPAN style="font-size: 18pt;"&gt; by -3&lt;/SPAN&gt;&amp;nbsp; ), the output is changed as such:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="3234" alt="Samples_chart_desc_by3.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/3234_Samples_chart_desc_by3.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;in another word, the Shape of output looks quite different from the original ascending way, so was the point view of statictical value, i.e. AMOUNT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So,&lt;SPAN style="font-size: 14pt; text-decoration: underline;"&gt; the question is how to generate Gchart by Descending Order,&amp;nbsp; and the stepping of midpoint should be defined automatically and same like it does by default Ascending way? or how should I specify and define a flexible data set(as here for AXIS) to meet the descending displaying requirement, like it defines and diaplays by Ascending order&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;or, does any one have knowledge or document about the internal definition details of default ascending processing?&lt;/P&gt;&lt;P&gt;It would be very much appreciated if anyone can help! Thank you in advance for your time!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Yuanbin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;====THE CODE and Data AS BELOW&lt;/P&gt;&lt;P&gt;data Sample2;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set Interest.Sample2;&lt;BR /&gt;run;&lt;BR /&gt;proc datasets lib=work nolist;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; modify Sample2;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Label Trans_Amount='Amount' Current_Price='Current Price' ;&lt;BR /&gt; quit;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; ods listing;&lt;BR /&gt; filename grafout "C:\Temp\j_BS_2D.gif";&lt;/P&gt;&lt;P&gt;goptions reset=all&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; device=gif&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gsfname=grafout&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gsfmode=replace;&lt;/P&gt;&lt;P&gt;GOPTIONS xpixels=400 ypixels=300;&lt;/P&gt;&lt;P&gt;GOPTIONS COLORS = (BLUE/*CX0F3E93 */, BLUE, CYAN, CXD2477C, Green, Red/*CX165627 */);&lt;/P&gt;&lt;P&gt;Legend1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FRAME&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; POSITION = (BOTTOM CENTER OUTSIDE);&lt;/P&gt;&lt;P&gt;Axis1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STYLE=1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WIDTH=1&lt;BR /&gt;/*&amp;nbsp; ORDER=(2580&amp;nbsp; to 2700 by 4) */&lt;BR /&gt;&amp;nbsp; ORDER=(2700 to 2580 by -3&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; LABEL=( "Current Price" ) &lt;/P&gt;&lt;P&gt;;&lt;BR /&gt; Axis2&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STYLE=1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WIDTH=1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MINOR=&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (NUMBER=1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;BR /&gt; ;&lt;BR /&gt; TITLE;&lt;/P&gt;&lt;P&gt;&amp;nbsp; TITLE1 h=2 "IF1304 Price Distribution Analysis" ;&lt;/P&gt;&lt;P&gt;FOOTNOTE;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; PROC GCHART DATA=Sample2 gout=work.gseg;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HBAR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Current_Price&lt;BR /&gt;&amp;nbsp; /&amp;nbsp; SUMVAR=Trans_Amount&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLIPREF&lt;BR /&gt;/*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DESCENDING&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;FRAME&amp;nbsp; SUM /* NOSTATS */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TYPE=SUM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LEGEND=LEGEND1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; COUTLINE=BLACK&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MAXIS=AXIS1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RAXIS=AXIS2&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LREF=34&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CREF=BLUE&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AUTOREF &lt;BR /&gt;&amp;nbsp; CTEXT=BLACK&amp;nbsp; &lt;BR /&gt;&amp;nbsp; CAXIS=BLACK&lt;BR /&gt; ;&lt;/P&gt;&lt;P&gt;RUN; QUIT;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;TITLE; FOOTNOTE;&lt;BR /&gt;GOPTIONS RESET=ALL;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2013 04:59:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gchart-Axis-How-to-generate-Gchart-by-Descending-Order-base-on-a/m-p/80596#M2987</guid>
      <dc:creator>tanyuanbin</dc:creator>
      <dc:date>2013-03-19T04:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: Gchart - Axis: How to generate Gchart by Descending Order base on a statistical variable, but it should meet the flexible and automatical stepping method like it does by default Ascending way?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-Axis-How-to-generate-Gchart-by-Descending-Order-base-on-a/m-p/80597#M2988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts:&lt;/P&gt;&lt;P&gt;If any advice or hlep, it's very much appreciated, Thanks!&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;Yuanbin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Mar 2013 05:25:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gchart-Axis-How-to-generate-Gchart-by-Descending-Order-base-on-a/m-p/80597#M2988</guid>
      <dc:creator>tanyuanbin</dc:creator>
      <dc:date>2013-03-21T05:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Gchart - Axis: How to generate Gchart by Descending Order base on a statistical variable, but it should meet the flexible and automatical stepping method like it does by default Ascending way?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-Axis-How-to-generate-Gchart-by-Descending-Order-base-on-a/m-p/80598#M2989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you use a 'by' value in the bar chart's midpoint axis, you are not only controlling the order, but also controlling the grouping (binning) of data each bar is comprised of.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I typically pre-summarize my bar chart data before I run gchart, and I either have a character midpoint variable, or I use the 'discrete' option (so that no grouping (binning) is done on the bars).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, if I want to control the orders of the bars in a way that Gchart does not provide, I sort my summarized data set as desired, assign a numeric variable to the data order (such as 'bar_order=_n_'), and then use that variable (bar_order) as my midpoint variable.&amp;nbsp; And I use a user-defined format so that the numeric variable (bar_order) will print in the graph as a text value that I want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Mar 2013 12:12:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gchart-Axis-How-to-generate-Gchart-by-Descending-Order-base-on-a/m-p/80598#M2989</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2013-03-21T12:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: Gchart - Axis: How to generate Gchart by Descending Order base on a statistical variable, but it should meet the flexible and automatical stepping method like it does by default Ascending way?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-Axis-How-to-generate-Gchart-by-Descending-Order-base-on-a/m-p/80599#M2990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Yuanbin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe what is happening here is that your ORDER option is excluding your data. Even when you use "by 4", you could be loosing data, unless the bins happen to fall in "by 4" increments. When you use "by 3", the exclusion pattern becomes different. In general, it is not good to use the ORDER option for categorical axes. You should use the MIDPOINTS option on the HBAR statement to set the bins, e.g. midpoints=(2700 to 2580 by -3).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Mar 2013 13:41:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gchart-Axis-How-to-generate-Gchart-by-Descending-Order-base-on-a/m-p/80599#M2990</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2013-03-21T13:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Gchart - Axis: How to generate Gchart by Descending Order base on a statistical variable, but it should meet the flexible and automatical stepping method like it does by default Ascending way?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-Axis-How-to-generate-Gchart-by-Descending-Order-base-on-a/m-p/80600#M2991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert and Dan,&lt;/P&gt;&lt;P&gt;I just came back and was looking for your advice, Robert's solution is a detailed one, I believed it can shoot the trouble in-deepth , while I applied for the advice from Dan first, it does work also!&amp;nbsp; I thank you all so much for the great help!&lt;/P&gt;&lt;P&gt;Thank you all for your time again!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;Yuanbin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Mar 2013 02:17:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gchart-Axis-How-to-generate-Gchart-by-Descending-Order-base-on-a/m-p/80600#M2991</guid>
      <dc:creator>tanyuanbin</dc:creator>
      <dc:date>2013-03-24T02:17:49Z</dc:date>
    </item>
  </channel>
</rss>

