<?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: reversing order of character variable in sgplot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/438866#M15140</link>
    <description>&lt;P&gt;I assume you want to create gaps between certain groups of observations (rows) in the table.&amp;nbsp; Please see the idea in this &lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2017/10/16/tips-tricks-multiple-blank-categories-axis/" target="_blank"&gt;article&lt;/A&gt;.&amp;nbsp; Same can be done for y-axis too.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the "Subgrouped Forest Plot" each group is merely another observation with missing odds ratio and statistics.&amp;nbsp; These also have a different text color.&amp;nbsp; The subgroup values (in each group) are indented using the YAxisTable option for indentation.&amp;nbsp; The presence of the group headers provides the appearance of gaps.&amp;nbsp; The article explains all this.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Feb 2018 05:09:45 GMT</pubDate>
    <dc:creator>Jay54</dc:creator>
    <dc:date>2018-02-21T05:09:45Z</dc:date>
    <item>
      <title>reversing order of character variable in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/438285#M15108</link>
      <description>&lt;P&gt;I have a character variable on the y axis, and need to reverse the order.&lt;/P&gt;&lt;P&gt;I created a new numeric ordinal &amp;nbsp;id variable in the excel version of the dataset, imported it to SAS, and reversed the order with proc sort.&lt;/P&gt;&lt;P&gt;It looked fine in proc print but in proc sgplot we did not have the desired order of the discrete variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, if I want to use sgpanel, and have two variations of these figures side by side (1 row, 2 columns), how to I arrange for a y axis table to be on the right of each figure? Would also like to only label one of the y axes?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Feb 2018 18:17:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/438285#M15108</guid>
      <dc:creator>ChristosK</dc:creator>
      <dc:date>2018-02-18T18:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: reversing order of character variable in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/438318#M15109</link>
      <description>&lt;P&gt;The default order for discrete values on a category axis (like this one) will be sorted in ascending alphabetic order.&amp;nbsp; You can change that by setting the DISCRETEORDER option on the x-axis.&amp;nbsp; Use &lt;SPAN&gt;DISCRETEORDER=&lt;/SPAN&gt;DATA if you want to preserve the order of the values&amp;nbsp;in the data set.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2018 01:04:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/438318#M15109</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2018-02-19T01:04:17Z</dc:date>
    </item>
    <item>
      <title>Re: reversing order of character variable in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/438319#M15110</link>
      <description>&lt;P&gt;Thank you Sanjay:&lt;/P&gt;&lt;P&gt;Yes, I did try that after Iooked at :&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/grstatproc/65235/HTML/default/viewer.htm#n0n6uml63c6h8dn16phbd1arm9g9.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/grstatproc/65235/HTML/default/viewer.htm#n0n6uml63c6h8dn16phbd1arm9g9.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;DISCRETEORDER= DATA | FORMATTED | UNFORMATTED&lt;SPAN class="shortDescription"&gt;specifies the order in which discrete tick values are placed on the axis.&lt;/SPAN&gt; &lt;SPAN class="paraSimpleFirst"&gt;Specify one of the following values:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;DATA&lt;/FONT&gt;&lt;/P&gt;&lt;DIV class="paraSimpleFirst"&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;places the values in the order in which they appear in the data.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="paraSimpleFirst"&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;FORMATTED&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="paraSimpleFirst"&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;sorts the formatted values in ascending character order.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="paraSimpleFirst"&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;UNFORMATTED&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="paraSimpleFirst"&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;sorts the unformatted values in ascending character order.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="summary"&gt;&lt;DIV&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;SPAN class="summaryDefault"&gt;Default:&lt;/SPAN&gt;UNFORMATTED&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;SPAN class="restriction"&gt;Restriction:&lt;/SPAN&gt;This option affects only box plots, dot plots, bar charts, and line plots, or for any axis where TYPE=DISCRETE.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I specifically wanted to reverse the direction, as the Y axis had these discrete values plotted from the bottom upwards, which is different in orientation to the order in the dataset.&lt;/DIV&gt;&lt;DIV&gt;I tried applying a "reverse" statement here but this didn't work.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I also created an additional ordinal numeric ID variable and used proc sort, &amp;nbsp;so the order was reversed in the SAS dataset; Even though the order was reversed by proc sort, the graph still came out the same.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Only thing that worked was reversing the order in an Excel version of this dataset.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;So.... is there not a way in SAS to plot a categorical axis in reverse orientation, but maintaining the same order?&lt;/DIV&gt;&lt;DIV&gt;In this case maintaining the order had clinical importance.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Christos&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2018 01:42:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/438319#M15110</guid>
      <dc:creator>ChristosK</dc:creator>
      <dc:date>2018-02-19T01:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: reversing order of character variable in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/438424#M15114</link>
      <description>&lt;P&gt;With SGPLOT, HBAR (and HBOX, DOT) displays the values from top to bottom.&amp;nbsp; This is different from other plots, where y axis is bottom to top.&amp;nbsp;&amp;nbsp;By default, the values are sorted.&amp;nbsp; You can set DISCRETEORDER=DATA to get them in the same order as the data, top to bottom.&amp;nbsp; REVERSE is not required.&amp;nbsp; If you use&amp;nbsp;&lt;SPAN&gt;REVERSE,&lt;/SPAN&gt;&amp;nbsp;the values will be bottom to top.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is different from GTL, where the default direction for y-axis is bottom to top and DATA order by default.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
  input Name $ Value;
  datalines;
B  10
A   5
D  12
C   9
;
run;

proc sgplot data=test;
  hbar name / response=value nostatlabel;
  yaxis discreteorder=data /*reverse*/;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2018 15:58:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/438424#M15114</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2018-02-19T15:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: reversing order of character variable in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/438824#M15127</link>
      <description>&lt;P&gt;Thank you Sanjay.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Initially it seemed as though I would only be able to chart 95% CI's for the OR by using a scatter command , but it looks like HBOX is able to do this automatically. My OR and CI's are values that I have calculated from the study database and recorded in a secondary database, so OR is not a continuous variable that I can plot with the choices that "seem" to be available for HBAR and DOT.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Scatter has "&lt;FONT color="#0000FF"&gt;scatter x&lt;/FONT&gt;=OR &lt;FONT color="#0000FF"&gt;y&lt;/FONT&gt;=Vp / &lt;FONT color="#0000FF"&gt;xerrorupper&lt;/FONT&gt;=UCL&lt;FONT color="#0000FF"&gt; xerrorlower&lt;/FONT&gt;=LCL", so plotting those is easy enough. I cant see how to do this in HBAR and DOT.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I have groups pdf variables that are "clustered" in terms of clinical significance, is there a way to create a space between the groups, or to have them indented (but starting from a left margin), with a subheading in the row above and indented more to the left?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 23:34:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/438824#M15127</guid>
      <dc:creator>ChristosK</dc:creator>
      <dc:date>2018-02-20T23:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: reversing order of character variable in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/438832#M15128</link>
      <description>&lt;P&gt;it would be easier to help if you provide your code and some sample (non confidential) data to illustrate what you want or are doing.&amp;nbsp; All plot statements (Scatter, HBox, Dot) support GROUP= option.&amp;nbsp; The group values can be clustered using GROUPDISPLAY=cluster.&amp;nbsp; Category values can be discrete or interval.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 00:26:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/438832#M15128</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2018-02-21T00:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: reversing order of character variable in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/438838#M15130</link>
      <description>&lt;P&gt;Here is the latest code I used and the output. Have made some progress.&lt;/P&gt;&lt;P&gt;How do you change the order of the table columns so the p values for mild and severe end up adjacent to their respective. Ors (CI)?&lt;/P&gt;&lt;P&gt;Will send the database in the next message .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc template;&lt;BR /&gt;define style mystyle;&lt;BR /&gt;parent=styles.sasweb;&lt;BR /&gt;class graphwalls /&lt;BR /&gt;frameborder=off;&lt;BR /&gt;class graphbackground /&lt;BR /&gt;color=white;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;ods listing close;&lt;BR /&gt;ods html style=mystyle path='.' file='newgraph.html';&lt;BR /&gt;ods graphics / reset=all border=off width=800 height=900;&lt;BR /&gt;/* sd OR's */&lt;BR /&gt;proc sgplot data =HEERDT.VP_Table2b2 nowall noborder ;&lt;BR /&gt;Title "OR (95% CI) for covariates across Vasoplegia Severity" ;&lt;BR /&gt;styleattrs datacontrastcolors=(CX18577A CX30CC6E ) ;&lt;BR /&gt;scatter x=sdOR y=Name / xerrorupper=sdUCL xerrorlower=sdLCL noerrorcaps markerattrs=(symbol=circlefilled size =5 )&lt;BR /&gt;group=Severity groupdisplay=cluster clusterwidth=0.6;&lt;BR /&gt;yaxis DISCRETEORDER= DATA reverse ;&lt;BR /&gt;xaxis display =(noticks nolabel noline) VALUEATTRS=(Color=Black Family=Arial Size=8 Style=Normal Weight=Normal)type =log logbase =10;&lt;BR /&gt;yaxis display =(noticks nolabel noline) VALUEATTRS=(Color=Black Family=Arial Size=8 Style=Normal Weight=Normal)&lt;BR /&gt;valueshalign=left colorbands=odd colorbandsattrs=(transparency=0.7);&lt;BR /&gt;refline 1.0 / axis=x discretethickness=1 lineattrs=(color=cxd0e0f0);&lt;/P&gt;&lt;P&gt;yaxistable pdp2_char sdORCI /class =Severity classdisplay =stack position=right location=outside&lt;BR /&gt;VALUEATTRS=(Color=Black Family=Arial Size=8 Weight=Normal ) VALUEHALIGN=CENTER VALUEJUSTIFY= CENTER CLASSORDER=DATA&lt;BR /&gt;COLORGROUP=Severity;&lt;BR /&gt;xaxis display=(nolabel) values=(0.4 1.0 1.5 2.0 2.5 5 6);&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 01:30:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/438838#M15130</guid>
      <dc:creator>ChristosK</dc:creator>
      <dc:date>2018-02-21T01:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: reversing order of character variable in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/438840#M15131</link>
      <description>&lt;P&gt;Here is the SAS database.&lt;/P&gt;&lt;P&gt;I've done most things, except:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Create a space between sets of clinical variables.&lt;/P&gt;&lt;P&gt;(eg preoperative conditions should be separated from bypass time, volume of blood products etc.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Possibly changing the shading so sets of variables are all shaded o e colour.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) Place&amp;nbsp;a subtitle above and slightly indented to the left of each of these sets.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4) p values in table for severe should be next to their OR (CI), not alternately. &amp;nbsp;I would probably remove the table lable colours.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Christos&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 01:35:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/438840#M15131</guid>
      <dc:creator>ChristosK</dc:creator>
      <dc:date>2018-02-21T01:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: reversing order of character variable in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/438844#M15132</link>
      <description>&lt;P&gt;The&amp;nbsp;data set "VP_Table2b.sas7bdat"&amp;nbsp;does not have the variable&amp;nbsp;&amp;nbsp;PDP2_Char.&lt;/P&gt;
&lt;P&gt;Some of the domain specific terminology you are using is not familiar to me.&lt;/P&gt;
&lt;P&gt;It seems you may want something like a &lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2016/05/30/ctspedia-clinical-graphs-subgrouped-forest-plot/" target="_blank"&gt;Subgrouped Forest Plot&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 01:58:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/438844#M15132</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2018-02-21T01:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: reversing order of character variable in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/438857#M15138</link>
      <description>&lt;P&gt;OMG.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry about that!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thats pretty embarrassing, here is the right database.&lt;/P&gt;&lt;P&gt;Have looked at the full code at the link you forwarded, but still unsure how to make subgroups. Will have to percolate on this overnight.&lt;/P&gt;&lt;P&gt;How can you create a space between potential subgroups?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 02:41:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/438857#M15138</guid>
      <dc:creator>ChristosK</dc:creator>
      <dc:date>2018-02-21T02:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: reversing order of character variable in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/438866#M15140</link>
      <description>&lt;P&gt;I assume you want to create gaps between certain groups of observations (rows) in the table.&amp;nbsp; Please see the idea in this &lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2017/10/16/tips-tricks-multiple-blank-categories-axis/" target="_blank"&gt;article&lt;/A&gt;.&amp;nbsp; Same can be done for y-axis too.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the "Subgrouped Forest Plot" each group is merely another observation with missing odds ratio and statistics.&amp;nbsp; These also have a different text color.&amp;nbsp; The subgroup values (in each group) are indented using the YAxisTable option for indentation.&amp;nbsp; The presence of the group headers provides the appearance of gaps.&amp;nbsp; The article explains all this.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 05:09:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/438866#M15140</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2018-02-21T05:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: reversing order of character variable in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/440305#M15198</link>
      <description>&lt;P&gt;Sanjay:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry about the late response. I have been trying to make this work, but am not able to get rid of the spaces yet on the categorical axis .&lt;/P&gt;&lt;P&gt;Maybe its an error that Im doing in formatting ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I never did see how you can change the order of the columns though. I wanted to have two columns of p values and two for OR (CI), but to have the "Mild:" response first, and then the p columns &amp;nbsp;and OR(CI) for the "Severe Response).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 19:01:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/440305#M15198</guid>
      <dc:creator>ChristosK</dc:creator>
      <dc:date>2018-02-26T19:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: reversing order of character variable in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/440313#M15199</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OK, so here is what I tried too do.&lt;/P&gt;&lt;P&gt;Relevant code in red, attachments demonstrate the output, and what is going wrong....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;proc format;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;value $Namefmt&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;"Age" ="Age"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;..........etc....&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;"A" ="."&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;"B" ="."&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;"C" ="."&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;FONT face="courier new,courier"&gt;proc template;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;   define style mystyle;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;   parent=styles.sasweb;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;      class graphwalls / &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;            frameborder=off;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;      class graphbackground / &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;            color=white;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;   end;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ods listing close;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ods html style=mystyle path='.' file='newgraph.html';&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ods graphics / reset=all border=off width=800 height=900;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;proc sgplot data = HEERDT.Vasoplegia_space  nowall noborder ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Title "OR (95% CI) for covariates across Vasoplegia Severity" ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;styleattrs datacontrastcolors=(CX18577A CX30CC6E  ) ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;scatter x=sdOR y=Name / xerrorupper=sdUCL xerrorlower=sdLCL noerrorcaps markerattrs=(symbol=circlefilled size =5 ) &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;group=Severity groupdisplay=cluster clusterwidth=0.6;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;yaxis DISCRETEORDER= DATA reverse &lt;FONT color="#FF0000"&gt;valueformat= $Namefmt.&lt;/FONT&gt;;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;xaxis display =(noticks  nolabel noline) VALUEATTRS=(Color=Black Family=Arial Size=8 Style=Normal Weight=Normal)type =log logbase =10;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;yaxis display =(noticks nolabel noline) VALUEATTRS=(Color=Black Family=Arial Size=8 Style=Normal Weight=Normal)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;valueshalign=left colorbands=odd colorbandsattrs=(transparency=0.7);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;refline 1.0 / axis=x discretethickness=1 lineattrs=(color=cxd0e0f0);&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;yaxistable pdp2_char sdORCI /class =Severity classdisplay =stack position=right location=outside &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;VALUEATTRS=(Color=Black Family=Arial Size=8  Weight=Normal ) VALUEHALIGN=CENTER VALUEJUSTIFY= CENTER CLASSORDER=DATA &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;COLORGROUP=Severity; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt; xaxis display=(nolabel) values=(0.4 1.0 1.5 2.0 2.5 5 6);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 19:31:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/reversing-order-of-character-variable-in-sgplot/m-p/440313#M15199</guid>
      <dc:creator>ChristosK</dc:creator>
      <dc:date>2018-02-26T19:31:41Z</dc:date>
    </item>
  </channel>
</rss>

