<?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: DISCRETEORDER=DATA  (PROC SGPLOT) in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/DISCRETEORDER-DATA-PROC-SGPLOT/m-p/19771#M460</link>
    <description>Can you post the procedure code snipit? Also post the data type of your variables.&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;BR /&gt;
Dan</description>
    <pubDate>Wed, 20 Oct 2010 15:29:27 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2010-10-20T15:29:27Z</dc:date>
    <item>
      <title>DISCRETEORDER=DATA  (PROC SGPLOT)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/DISCRETEORDER-DATA-PROC-SGPLOT/m-p/19766#M455</link>
      <description>I am trying to produce a scatter plot where the y-axis is ordered in ascending order instead of formatted values. I have sorted the data and used :&lt;BR /&gt;
yaxis grid discreteorder=data;    &lt;BR /&gt;
&lt;BR /&gt;
But it makes no difference. I see there is a technical report (problem note 31189) on this for dot plots and the work around suggested uses the SCATTER statement in PROC SGPLOT . However I am already using scatter. I tried running the two pieces of code on the technical support page and got the same results with both.</description>
      <pubDate>Wed, 20 Oct 2010 10:59:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/DISCRETEORDER-DATA-PROC-SGPLOT/m-p/19766#M455</guid>
      <dc:creator>cws</dc:creator>
      <dc:date>2010-10-20T10:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: DISCRETEORDER=DATA  (PROC SGPLOT)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/DISCRETEORDER-DATA-PROC-SGPLOT/m-p/19767#M456</link>
      <description>Perhpas "proc gplot" will do what you're wanting(?)</description>
      <pubDate>Wed, 20 Oct 2010 13:38:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/DISCRETEORDER-DATA-PROC-SGPLOT/m-p/19767#M456</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2010-10-20T13:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: DISCRETEORDER=DATA  (PROC SGPLOT)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/DISCRETEORDER-DATA-PROC-SGPLOT/m-p/19768#M457</link>
      <description>If your data is numeric, you may also need to set TYPE=DISCRETE on the YAXIS statement.&lt;BR /&gt;
&lt;BR /&gt;
-- Dan</description>
      <pubDate>Wed, 20 Oct 2010 14:54:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/DISCRETEORDER-DATA-PROC-SGPLOT/m-p/19768#M457</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2010-10-20T14:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: DISCRETEORDER=DATA  (PROC SGPLOT)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/DISCRETEORDER-DATA-PROC-SGPLOT/m-p/19769#M458</link>
      <description>I tried that- it makes no difference. I also tried running both bits of suggested code in the fix on the SAS support pages (i.e. for problem note 31189) and got the same output both times.</description>
      <pubDate>Wed, 20 Oct 2010 15:20:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/DISCRETEORDER-DATA-PROC-SGPLOT/m-p/19769#M458</guid>
      <dc:creator>cws</dc:creator>
      <dc:date>2010-10-20T15:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: DISCRETEORDER=DATA  (PROC SGPLOT)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/DISCRETEORDER-DATA-PROC-SGPLOT/m-p/19770#M459</link>
      <description>Can you post up a small example (data &amp;amp; code)?</description>
      <pubDate>Wed, 20 Oct 2010 15:25:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/DISCRETEORDER-DATA-PROC-SGPLOT/m-p/19770#M459</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2010-10-20T15:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: DISCRETEORDER=DATA  (PROC SGPLOT)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/DISCRETEORDER-DATA-PROC-SGPLOT/m-p/19771#M460</link>
      <description>Can you post the procedure code snipit? Also post the data type of your variables.&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;BR /&gt;
Dan</description>
      <pubDate>Wed, 20 Oct 2010 15:29:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/DISCRETEORDER-DATA-PROC-SGPLOT/m-p/19771#M460</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2010-10-20T15:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: DISCRETEORDER=DATA  (PROC SGPLOT)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/DISCRETEORDER-DATA-PROC-SGPLOT/m-p/19772#M461</link>
      <description>Here is some data and the code I am using. It is a plot of estimates with CIs for several variables (identified by CNO). I wanted the plot to order cno by ratio rather than numeric order of cno. &lt;BR /&gt;
&lt;BR /&gt;
data aplot;&lt;BR /&gt;
	input cno ratiolowercl ratioestimate ratiouppercl;&lt;BR /&gt;
	datalines;&lt;BR /&gt;
10        0.55541         2.05934          7.63559&lt;BR /&gt;
8         0.45885         1.31806          3.78619&lt;BR /&gt;
6         0.33371         1.04236          3.25585&lt;BR /&gt;
9         0.23368         0.81469          2.84031&lt;BR /&gt;
13        0.39450         0.80129          1.62756&lt;BR /&gt;
3         0.19638         0.78082          3.10455&lt;BR /&gt;
12        0.08985         0.72433          5.83897&lt;BR /&gt;
2         0.35373         0.65671          1.21921&lt;BR /&gt;
5         0.29766         0.65028          1.42060&lt;BR /&gt;
4         0.25529         0.63470          1.57801&lt;BR /&gt;
7         0.07987         0.33106          1.37215&lt;BR /&gt;
run;&lt;BR /&gt;
proc sort data=aplot;&lt;BR /&gt;
	by descending ratioestimate;&lt;BR /&gt;
run;&lt;BR /&gt;
proc sgplot data=aplot;&lt;BR /&gt;
	yaxis grid type=discrete discreteorder=data;&lt;BR /&gt;
	xaxis type=log logbase=10;&lt;BR /&gt;
	scatter y=cno x=ratioestimate /xerrorlower=ratiolowercl xerrorupper=ratiouppercl ;&lt;BR /&gt;
	refline  1/axis=x label='Ratio=1';&lt;BR /&gt;
run;

I have just discovered that if I use a character variable instead of CNO (numeric) it works correctly. Before I was assigning a character format to the numeric variable CNO. &lt;BR /&gt;
&lt;BR /&gt;
    &lt;BR /&gt;
Message was edited by: cws</description>
      <pubDate>Wed, 20 Oct 2010 16:00:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/DISCRETEORDER-DATA-PROC-SGPLOT/m-p/19772#M461</guid>
      <dc:creator>cws</dc:creator>
      <dc:date>2010-10-20T16:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: DISCRETEORDER=DATA  (PROC SGPLOT)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/DISCRETEORDER-DATA-PROC-SGPLOT/m-p/19773#M462</link>
      <description>The solution is to create a second CNO column that is character and use that column for the Y variable. The ODS Graphics system is forcing the numeric values into ascending order. Making them character get around this. The DISCRETEORDER=DATA option currently works with only bar charts, line charts, dot plots, and box plot plots, so you can remove it for this example. &lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;BR /&gt;
Dan</description>
      <pubDate>Wed, 20 Oct 2010 16:12:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/DISCRETEORDER-DATA-PROC-SGPLOT/m-p/19773#M462</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2010-10-20T16:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: DISCRETEORDER=DATA  (PROC SGPLOT)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/DISCRETEORDER-DATA-PROC-SGPLOT/m-p/19774#M463</link>
      <description>Thanks Dan.&lt;BR /&gt;
&lt;BR /&gt;
Got there in the end!</description>
      <pubDate>Wed, 20 Oct 2010 16:25:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/DISCRETEORDER-DATA-PROC-SGPLOT/m-p/19774#M463</guid>
      <dc:creator>cws</dc:creator>
      <dc:date>2010-10-20T16:25:22Z</dc:date>
    </item>
  </channel>
</rss>

