<?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 edit this forest plot code to accommodate a non-log scale? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-to-edit-this-forest-plot-code-to-accommodate-a-non-log-scale/m-p/237135#M8600</link>
    <description>Thanks so much!</description>
    <pubDate>Tue, 01 Dec 2015 10:04:30 GMT</pubDate>
    <dc:creator>j4ne</dc:creator>
    <dc:date>2015-12-01T10:04:30Z</dc:date>
    <item>
      <title>How to edit this forest plot code to accommodate a non-log scale?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-edit-this-forest-plot-code-to-accommodate-a-non-log-scale/m-p/236925#M8591</link>
      <description>&lt;P&gt;I want to create a version of the forest plot here: &lt;A href="http://support.sas.com/kb/42/867.html" target="_self"&gt;http://support.sas.com/kb/42/867.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Unfortunately, the scale isn't useful for the values I want to include (Hedge's g instead of odds ratio), which range from ~-2 to +8. If I include a negative number in the datalines, the whole plot becomes unreadable.&lt;BR /&gt;&lt;BR /&gt;Is it possible to rejig the code to accommodate the scale? I'm not overly familiar with SAS, so my coding skills are fairly limited.&lt;BR /&gt;&lt;BR /&gt;Part of the code that I've tried editing to no avail:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sgplot data=forest4 noautolegend;&lt;BR /&gt;scatter y=study2value x=oddsratio / markerattrs=graphdata2(symbol=diamondfilled size=10);&lt;BR /&gt;scatter y=studyvalue x=oddsratio / xerrorupper=ucl2 xerrorlower=lcl2 markerattrs=graphdata1(symbol=squarefilled size=0);&lt;BR /&gt;vector x=x2 y=studyvalue / xorigin=x1 yorigin=studyvalue lineattrs=graphdata1(thickness=8) noarrowheads;&lt;BR /&gt;scatter y=studyvalue x=or / markerchar=oddsratio x2axis;&lt;BR /&gt;scatter y=studyvalue x=lcl / markerchar=lowercl x2axis;&lt;BR /&gt;scatter y=studyvalue x=ucl / markerchar=uppercl x2axis;&lt;BR /&gt;scatter y=studyvalue x=wt / markerchar=weight x2axis;&lt;BR /&gt;&lt;STRONG&gt;refline 1 100 / axis=x;&lt;BR /&gt;refline 0.1 10&lt;/STRONG&gt; / axis=x lineattrs=(pattern=shortdash) transparency=0.5;&lt;BR /&gt;inset ' Favors Treatment' / position=bottomleft;&lt;BR /&gt;inset 'Favors Placebo' / position=bottom;&lt;BR /&gt;&lt;STRONG&gt;xaxis type=log offsetmin=0 offsetmax=0.35 min=0.01 max=100 minor display=(nolabel) &lt;/STRONG&gt;;&lt;BR /&gt;x2axis offsetmin=0.7 display=(noticks nolabel);&lt;BR /&gt;yaxis display=(noticks nolabel) offsetmin=0.1 offsetmax=0.05 values=(1 to &amp;amp;count by 1);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks for any help&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2015 12:20:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-edit-this-forest-plot-code-to-accommodate-a-non-log-scale/m-p/236925#M8591</guid>
      <dc:creator>j4ne</dc:creator>
      <dc:date>2015-11-30T12:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit this forest plot code to accommodate a non-log scale?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-edit-this-forest-plot-code-to-accommodate-a-non-log-scale/m-p/236950#M8593</link>
      <description>&lt;P&gt;Given&amp;nbsp;Hedge's g&amp;nbsp;values ranging from -2 to 8, my&amp;nbsp;first attempt would be:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Delete "type=log" from the XAXIS statement. (Only positive values are&amp;nbsp;suitable for a logarithmic scale.)&lt;/LI&gt;
&lt;LI&gt;In the same line change 0.01 to a value slightly less than the minimum g value in your data (or rather the minimum LCL), e.g. -3, and 100&amp;nbsp;&lt;SPAN&gt;to a value slightly greater than the maximum value in your data (or the maximum UCL, respectively), e.g. 9.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Remove the REFLINE statements or change the values 1, 100, 0.1, 10 to values which make sense on the new scale from -3 to 9 (what about 0?). So, maybe a single refline statement&amp;nbsp;&lt;STRONG&gt;refline 0 / axis=x;&lt;/STRONG&gt; would be sufficient.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Similarly, remove or replace the INSET statements.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Of course, all references to odds ratios in the plot should be replaced by references to Hedge's g.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN&gt;Possibly you don't like the tick mark values that SAS determines automatically (e.g. -2.5, 0.0, 2.5, etc.) and you would prefer tick marks at -3, -2, -1, etc. In this case you can replace the specification "min=-3 max=9" in the XAXIS statement by "values=(-3 to 9)". Furthermore, you can drop the keyword "minor" if you don't need the unlabeled smaller tick marks between the major tick marks.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2015 14:14:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-edit-this-forest-plot-code-to-accommodate-a-non-log-scale/m-p/236950#M8593</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2015-11-30T14:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit this forest plot code to accommodate a non-log scale?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-edit-this-forest-plot-code-to-accommodate-a-non-log-scale/m-p/237135#M8600</link>
      <description>Thanks so much!</description>
      <pubDate>Tue, 01 Dec 2015 10:04:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-edit-this-forest-plot-code-to-accommodate-a-non-log-scale/m-p/237135#M8600</guid>
      <dc:creator>j4ne</dc:creator>
      <dc:date>2015-12-01T10:04:30Z</dc:date>
    </item>
  </channel>
</rss>

