<?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: How to Order SGPlot or Display values of a Different Variable on x-axis in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Order-SGPlot-or-Display-values-of-a-Different-Variable-on/m-p/102071#M3802</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I ended up calculating a rank variable for the x-axis and creating a format for the ranks that contain the values of the third variables for the ranks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Jul 2013 21:57:13 GMT</pubDate>
    <dc:creator>Haris</dc:creator>
    <dc:date>2013-07-01T21:57:13Z</dc:date>
    <item>
      <title>How to Order SGPlot or Display values of a Different Variable on x-axis</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Order-SGPlot-or-Display-values-of-a-Different-Variable-on/m-p/102070#M3801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I have a dataset with summary statistics (OR and Confidence Intervals) for a number of centers.&amp;nbsp; I would like to plot these in an increasing order on the x-axis.&amp;nbsp; SCATTER does not respect discereorder=data and orders the x-axis by x-variable.&amp;nbsp; Discrete x-axis routines (VLine, etc.) do not offer a way to display the confidence interval.&amp;nbsp; So far the best I can do is to suppress the display of x-axis values and use MARKERCHAR to get the values of the center variable.&amp;nbsp; However, it get the centers inside the figure.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Any suggestions?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;data c;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do TID=1 to 10;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; OR = exp(rannor(0));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; SE = ranuni(0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Lower = exp(log(OR)-1.96*SE);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Upper = exp(log(OR)+1.96*SE);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; L = -1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;proc sort data=c; by OR;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgplot data=c;&lt;/P&gt;&lt;P&gt;&amp;nbsp; refline 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; scatter x=TID y=OR / yerrorlower=Lower yerrorupper=Upper;&lt;/P&gt;&lt;P&gt;&amp;nbsp; xaxis type=discrete discreteorder=data; /* values are displayed in an increasing order of TID */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgplot data=c noautolegend;&lt;/P&gt;&lt;P&gt;&amp;nbsp; refline 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; scatter x=OR y=OR / yerrorlower=Lower yerrorupper=Upper;&lt;/P&gt;&lt;P&gt;&amp;nbsp; scatter x=OR y=L / markerchar=TID;&lt;/P&gt;&lt;P&gt;&amp;nbsp; xaxis type=discrete display=(novalues) label='TID';&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second plot gets me close to what I want but I suspect that there has to be a way use a different variable to display values of the x-axis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jun 2013 20:21:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Order-SGPlot-or-Display-values-of-a-Different-Variable-on/m-p/102070#M3801</guid>
      <dc:creator>Haris</dc:creator>
      <dc:date>2013-06-10T20:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to Order SGPlot or Display values of a Different Variable on x-axis</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Order-SGPlot-or-Display-values-of-a-Different-Variable-on/m-p/102071#M3802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I ended up calculating a rank variable for the x-axis and creating a format for the ranks that contain the values of the third variables for the ranks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jul 2013 21:57:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Order-SGPlot-or-Display-values-of-a-Different-Variable-on/m-p/102071#M3802</guid>
      <dc:creator>Haris</dc:creator>
      <dc:date>2013-07-01T21:57:13Z</dc:date>
    </item>
  </channel>
</rss>

