<?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 Arrow in not at the end of the bar with SPGLOT and HIGHCAP in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Arrow-in-not-at-the-end-of-the-bar-with-SPGLOT-and-HIGHCAP/m-p/881889#M348458</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;would very much appreciate your assisstance with SGPLOT using HIGHCAP.&lt;/P&gt;&lt;P&gt;I have monthly usage data for 2 patients:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;data usage ;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;infile datalines;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;input ptid:$10. usage:$12. month year start end highcap:$20. idname:$10.;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;datalines;&lt;/DIV&gt;&lt;DIV&gt;2 &amp;gt;=75% 8 2018 0 9 FilledArrow 2&lt;/DIV&gt;&lt;DIV&gt;2 &amp;gt;=75% 9 2018 1 8 FilledArrow blank&lt;/DIV&gt;&lt;DIV&gt;2 &amp;gt;=75% 10 2018 2 8 FilledArrow blank&lt;/DIV&gt;&lt;DIV&gt;2 &amp;gt;=75% 11 2018 3 8 FilledArrow blank&lt;/DIV&gt;&lt;DIV&gt;2 50%-75% 12 2018 4 8 FilledArrow blank&lt;/DIV&gt;&lt;DIV&gt;2 50%-75% 1 2019 5 8 FilledArrow blank&lt;/DIV&gt;&lt;DIV&gt;2 &amp;gt;=75% 2 2019 6 8 FilledArrow blank&lt;/DIV&gt;&lt;DIV&gt;2 &amp;gt;=75% 3 2019 7 8 FilledArrow blank&lt;/DIV&gt;&lt;DIV&gt;1 &amp;gt;=75% 4 2018 0 1 null 1&lt;/DIV&gt;&lt;DIV&gt;1 &amp;gt;=75% 5 2018 1 2 null blank&lt;/DIV&gt;&lt;DIV&gt;1 &amp;gt;=75% 6 2018 2 3 null blank&lt;/DIV&gt;&lt;DIV&gt;1 &amp;gt;=75% 7 2018 3 4 null blank&lt;/DIV&gt;&lt;DIV&gt;1 50%-75% 8 2018 4 5 null blank&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;;&lt;/DIV&gt;&lt;DIV&gt;data usage;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;set usage;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if highcap='null' then highcap='';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if idname='blank' then idname='';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'm creating a horizontal bar plot per patient over time (months), annotating each usage category with color (low=red, medium/low=orange, medium=yellow and high=green). I want the ongoing patient to be flagged with arrow. I use the following code:&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;BR /&gt;proc sgplot data=usage dattrmap=attrmap ;&lt;BR /&gt;highlow y=Ptid low=start high=end / type=bar group=Usage&lt;BR /&gt;lineattrs=(color=black pattern=solid) barwidth=1&lt;BR /&gt;lowlabel=idname highcap=highcap attrid=Usage_Rang labelattrs=(color=black size=8) ;&lt;BR /&gt;keylegend / title='Usage' valueattrs=(size=8pt) titleattrs=(size=8pt);&lt;BR /&gt;scatter y=Ptid x=start / markerattrs=(size=0) ;&lt;BR /&gt;xaxis grid label = 'Treatment duration (Months)' offsetmax=0.02 values=(0 to 36 by 3);&lt;BR /&gt;yaxis grid display=(noticks novalues nolabel) ;&lt;/P&gt;&lt;P&gt;footnote1 j=c HEIGHT=10pt FONT='Arial' '"Arrow-heads" denote Patient On Therapy';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but it seems like the arrow is being placed in the patient's first month, not last:&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dkosovsky_0-1687437359709.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85239i548177C3A016FA19/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dkosovsky_0-1687437359709.png" alt="dkosovsky_0-1687437359709.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any thoughts about how to adjust the code so that the arrow will appear at month 8?&lt;/P&gt;&lt;P&gt;your help will be very much appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 22 Jun 2023 12:37:25 GMT</pubDate>
    <dc:creator>dkosovsky</dc:creator>
    <dc:date>2023-06-22T12:37:25Z</dc:date>
    <item>
      <title>Arrow in not at the end of the bar with SPGLOT and HIGHCAP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Arrow-in-not-at-the-end-of-the-bar-with-SPGLOT-and-HIGHCAP/m-p/881889#M348458</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;would very much appreciate your assisstance with SGPLOT using HIGHCAP.&lt;/P&gt;&lt;P&gt;I have monthly usage data for 2 patients:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;data usage ;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;infile datalines;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;input ptid:$10. usage:$12. month year start end highcap:$20. idname:$10.;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;datalines;&lt;/DIV&gt;&lt;DIV&gt;2 &amp;gt;=75% 8 2018 0 9 FilledArrow 2&lt;/DIV&gt;&lt;DIV&gt;2 &amp;gt;=75% 9 2018 1 8 FilledArrow blank&lt;/DIV&gt;&lt;DIV&gt;2 &amp;gt;=75% 10 2018 2 8 FilledArrow blank&lt;/DIV&gt;&lt;DIV&gt;2 &amp;gt;=75% 11 2018 3 8 FilledArrow blank&lt;/DIV&gt;&lt;DIV&gt;2 50%-75% 12 2018 4 8 FilledArrow blank&lt;/DIV&gt;&lt;DIV&gt;2 50%-75% 1 2019 5 8 FilledArrow blank&lt;/DIV&gt;&lt;DIV&gt;2 &amp;gt;=75% 2 2019 6 8 FilledArrow blank&lt;/DIV&gt;&lt;DIV&gt;2 &amp;gt;=75% 3 2019 7 8 FilledArrow blank&lt;/DIV&gt;&lt;DIV&gt;1 &amp;gt;=75% 4 2018 0 1 null 1&lt;/DIV&gt;&lt;DIV&gt;1 &amp;gt;=75% 5 2018 1 2 null blank&lt;/DIV&gt;&lt;DIV&gt;1 &amp;gt;=75% 6 2018 2 3 null blank&lt;/DIV&gt;&lt;DIV&gt;1 &amp;gt;=75% 7 2018 3 4 null blank&lt;/DIV&gt;&lt;DIV&gt;1 50%-75% 8 2018 4 5 null blank&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;;&lt;/DIV&gt;&lt;DIV&gt;data usage;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;set usage;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if highcap='null' then highcap='';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if idname='blank' then idname='';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'm creating a horizontal bar plot per patient over time (months), annotating each usage category with color (low=red, medium/low=orange, medium=yellow and high=green). I want the ongoing patient to be flagged with arrow. I use the following code:&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;BR /&gt;proc sgplot data=usage dattrmap=attrmap ;&lt;BR /&gt;highlow y=Ptid low=start high=end / type=bar group=Usage&lt;BR /&gt;lineattrs=(color=black pattern=solid) barwidth=1&lt;BR /&gt;lowlabel=idname highcap=highcap attrid=Usage_Rang labelattrs=(color=black size=8) ;&lt;BR /&gt;keylegend / title='Usage' valueattrs=(size=8pt) titleattrs=(size=8pt);&lt;BR /&gt;scatter y=Ptid x=start / markerattrs=(size=0) ;&lt;BR /&gt;xaxis grid label = 'Treatment duration (Months)' offsetmax=0.02 values=(0 to 36 by 3);&lt;BR /&gt;yaxis grid display=(noticks novalues nolabel) ;&lt;/P&gt;&lt;P&gt;footnote1 j=c HEIGHT=10pt FONT='Arial' '"Arrow-heads" denote Patient On Therapy';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but it seems like the arrow is being placed in the patient's first month, not last:&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dkosovsky_0-1687437359709.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85239i548177C3A016FA19/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dkosovsky_0-1687437359709.png" alt="dkosovsky_0-1687437359709.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any thoughts about how to adjust the code so that the arrow will appear at month 8?&lt;/P&gt;&lt;P&gt;your help will be very much appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 22 Jun 2023 12:37:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Arrow-in-not-at-the-end-of-the-bar-with-SPGLOT-and-HIGHCAP/m-p/881889#M348458</guid>
      <dc:creator>dkosovsky</dc:creator>
      <dc:date>2023-06-22T12:37:25Z</dc:date>
    </item>
  </channel>
</rss>

