<?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: SGPLOT- Vline- Reomove connecting lines in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Vline-Reomove-connecting-lines/m-p/810673#M22810</link>
    <description>Thanks that works well. But I was thinking maybe bars with different fills</description>
    <pubDate>Fri, 29 Apr 2022 14:57:49 GMT</pubDate>
    <dc:creator>HF_clin</dc:creator>
    <dc:date>2022-04-29T14:57:49Z</dc:date>
    <item>
      <title>SGPLOT- Vline- Reomove connecting lines</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Vline-Reomove-connecting-lines/m-p/810584#M22802</link>
      <description>&lt;P&gt;I don't want the connecting lines between the mean (this is no time series) but can't see how to remove them and still keep the rest. Plus I would like a small black box to represent the mean. Vbar has nicer bars than these tiny ones from vline but it does not display the statistics I want. Any idees? Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sgplot data=k;* NOAUTOLEGEND;&lt;BR /&gt;vline treat / response=ODOS group=POS groupdisplay=cluster clusterwidth=0.5 lineattrs=(thickness=1) stat=mean limitstat=CLM;&lt;BR /&gt;xaxis offsetmin=0.2 offsetmax=0.2;&lt;BR /&gt;yaxis label='Mean SRT with 95% CI' max=550;&lt;BR /&gt;format treat treat. pos pos.;&lt;BR /&gt;label treat='Risk group' pos='Eye';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HF_clin_0-1651231406140.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70981i3655BC70C106CA23/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HF_clin_0-1651231406140.png" alt="HF_clin_0-1651231406140.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 11:24:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Vline-Reomove-connecting-lines/m-p/810584#M22802</guid>
      <dc:creator>HF_clin</dc:creator>
      <dc:date>2022-04-29T11:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT- Vline- Reomove connecting lines</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Vline-Reomove-connecting-lines/m-p/810616#M22803</link>
      <description>&lt;PRE&gt;proc sgplot data=sashelp.class;
vline sex / response=weight group=age
groupdisplay=cluster clusterwidth=0.5 lineattrs=(&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;thickness=0&lt;/STRONG&gt;&lt;/FONT&gt;) stat=mean limitstat=CLM;
run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Apr 2022 12:58:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Vline-Reomove-connecting-lines/m-p/810616#M22803</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-04-29T12:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT- Vline- Reomove connecting lines</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Vline-Reomove-connecting-lines/m-p/810633#M22804</link>
      <description>&lt;P&gt;Tried that but no mean mark or box on the Mean and the box below does not show colors of OD and OS&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HF_clin_0-1651239129427.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70983iE09F8CC7B15EEA76/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HF_clin_0-1651239129427.png" alt="HF_clin_0-1651239129427.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 13:33:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Vline-Reomove-connecting-lines/m-p/810633#M22804</guid>
      <dc:creator>HF_clin</dc:creator>
      <dc:date>2022-04-29T13:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT- Vline- Reomove connecting lines</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Vline-Reomove-connecting-lines/m-p/810637#M22805</link>
      <description>&lt;P&gt;Also add the MARKERS option to the VLINE statement.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 13:38:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Vline-Reomove-connecting-lines/m-p/810637#M22805</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2022-04-29T13:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT- Vline- Reomove connecting lines</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Vline-Reomove-connecting-lines/m-p/810639#M22806</link>
      <description>As DanH said:&lt;BR /&gt;&lt;BR /&gt;proc sgplot data=sashelp.class;&lt;BR /&gt;vline sex / response=weight group=age    markers&lt;BR /&gt;groupdisplay=cluster clusterwidth=0.5 lineattrs=(thickness=0) stat=mean limitstat=CLM;&lt;BR /&gt;run;</description>
      <pubDate>Fri, 29 Apr 2022 13:43:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Vline-Reomove-connecting-lines/m-p/810639#M22806</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-04-29T13:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT- Vline- Reomove connecting lines</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Vline-Reomove-connecting-lines/m-p/810640#M22807</link>
      <description>&lt;P&gt;If you don't want a line, then don't use the V&lt;STRONG&gt;LINE&amp;nbsp;&lt;/STRONG&gt;statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the DOT statement if you are willing to have a horizontal display instead of a vertical display:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=k;
dot treat / response=ODOS group=POS groupdisplay=cluster 
clusterwidth=0.5 stat=mean limitstat=CLM;
xaxis offsetmin=0.2 offsetmax=0.2;
yaxis label='Mean SRT with 95% CI' max=550;
label treat='Risk group' pos='Eye';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I have argued that there are &lt;A href="https://blogs.sas.com/content/iml/2021/04/12/horizontal-bar-chart.html" target="_self"&gt;very good reasons to prefer a horizontal chart for categorical data.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you insist on a vertical display, you can also generate the summary statistics by using PROC MEANS and then use a SCATTER statement with the YERRORLOWER= and YERRORUPPR= options. I don't have your data, but I think the analysis would looks something like this (untested):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=k mean LCLM UCLM;
class POS Treat;
var ODOS;
output out=MeansOut mean=Mean LCLM=LCLM UCLM=UCLM;
run;

proc sgplot data=MeansOut;
where _TYPE_=3;
scatter x=treat y=Mean / yerrorlower=LCLM yerrorupper=UCLM group=POS groupdisplay=cluster;
xaxis offsetmin=0.2 offsetmax=0.2;
yaxis label='Mean SRT with 95% CI' max=550;
label treat='Risk group' pos='Eye';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Apr 2022 13:46:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Vline-Reomove-connecting-lines/m-p/810640#M22807</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2022-04-29T13:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT- Vline- Reomove connecting lines</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Vline-Reomove-connecting-lines/m-p/810656#M22808</link>
      <description>&lt;P&gt;Added this to get the fill I wanted:&amp;nbsp;lineattrs=(thickness=0) markerattrs=(symbol=squarefilled) markers. Is ok but ususally like thicker bars than this. The ex with means and scatter nned some more work (it thinks x is not discrete even after adding format (numbers used a 1 2 3), it shows 1, 1.5, 2 ,..) + filledsquare needed so this here is easier.)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HF_clin_0-1651241742526.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70985i9201367D1B1DEE85/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HF_clin_0-1651241742526.png" alt="HF_clin_0-1651241742526.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 14:18:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Vline-Reomove-connecting-lines/m-p/810656#M22808</guid>
      <dc:creator>HF_clin</dc:creator>
      <dc:date>2022-04-29T14:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT- Vline- Reomove connecting lines</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Vline-Reomove-connecting-lines/m-p/810671#M22809</link>
      <description>&lt;P&gt;You can use LIMITATTRS=(thickness=3) (or more) to make the limit lines thicker. and you can use MARKERSATTRS=(size=11) to make the markers bigger to compensate for the thicker lines.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 14:48:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Vline-Reomove-connecting-lines/m-p/810671#M22809</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2022-04-29T14:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT- Vline- Reomove connecting lines</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Vline-Reomove-connecting-lines/m-p/810673#M22810</link>
      <description>Thanks that works well. But I was thinking maybe bars with different fills</description>
      <pubDate>Fri, 29 Apr 2022 14:57:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Vline-Reomove-connecting-lines/m-p/810673#M22810</guid>
      <dc:creator>HF_clin</dc:creator>
      <dc:date>2022-04-29T14:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT- Vline- Reomove connecting lines</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Vline-Reomove-connecting-lines/m-p/810777#M22811</link>
      <description>&lt;P&gt;You can use a HIGHLOW plot with TYPE=BAR to create that type of display. However, you wouldl need to precompute your data using PROC SUMMARY or PROC MEANS.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Apr 2022 05:54:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Vline-Reomove-connecting-lines/m-p/810777#M22811</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2022-04-30T05:54:27Z</dc:date>
    </item>
  </channel>
</rss>

