<?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: Need help with Annotate Arrow Function in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Need-help-with-Annotate-Arrow-Function/m-p/946808#M25059</link>
    <description>&lt;P&gt;Unless you really need to use annotation data, another method could be using Symbolchar statement to create the arrow sign you want. You can use textattrs and scale to fine tuning the arrow shape. There are more than 100 arrow shapes from Unicode. If you go to &lt;A href="https://en.wikipedia.org/wiki/Arrows_(Unicode_block)" target="_blank"&gt;https://en.wikipedia.org/wiki/Arrows_(Unicode_block)&lt;/A&gt; you can choose one as you need.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then use the scatter statement to put the arrow(s) as you want. If you need to attach it to real data, just create the location of the x value(s) of the arrow and the y value(s). Yes, of course, you can change the arrow shape with markerattrs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry, I can't give you the actual code, but you already use scatter statement so it won't be hard, I think. Add markerattrs, name, legendlabel if you need to make your plot look more explainable. I am trying not to use annotation as much as possible unless it's definitely necessary to use.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Oct 2024 16:24:17 GMT</pubDate>
    <dc:creator>BAGaucho</dc:creator>
    <dc:date>2024-10-09T16:24:17Z</dc:date>
    <item>
      <title>Need help with Annotate Arrow Function</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Need-help-with-Annotate-Arrow-Function/m-p/811754#M22817</link>
      <description>&lt;P&gt;Esteemed Advisers:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying but failing to get annotate a scatterplot with arrows.&amp;nbsp; Below is a simplified version of my code that demonstrates the problem.&amp;nbsp; Probably a simple fix that I'm just not seeing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance for your help,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Gene&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options mprint symbolgen;

/*Create scatter plot dataset*/
data work.plot_data;
	input lat lon alt;
	datalines;
34.0 -105.0 120
33.0 -104.0 120
;
run;

/*Create arrow dataset file*/
data work.arrow_data;
	input latbeg lonbeg latend lonend;
	datalines;
34.5 -105.5 34.0 -105.0
33.5 -104.5 33.0 -104.0
;
run;

/*Create arrow_anno dataset*/
data arrow_anno;
set work.arrow_data;
retain xsys ysys '2' hsys '3' when 'a';
function='arrow';
x1=lonbeg;
y1=latbeg;
x2=lonend;
y2=latend;
color='black';
line=2;
size=.7;
style='FILLED';
run;

ods graphics;
/*Generate plot*/
proc sgplot data=work.plot_data sganno=arrow_anno aspect=1;
Title "Anno Arrow Test";
	scatter x=lon y=lat;
	xaxis grid min=-106 max=-103 minorgrid;
	yaxis grid min=30 max=35 minorgrid;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 May 2022 20:53:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Need-help-with-Annotate-Arrow-Function/m-p/811754#M22817</guid>
      <dc:creator>genemroz</dc:creator>
      <dc:date>2022-05-05T20:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Annotate Arrow Function</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Need-help-with-Annotate-Arrow-Function/m-p/811762#M22818</link>
      <description>&lt;P&gt;The SGANNO feature uses a different data set than the SAS/GRAPH Annotation data set.&lt;/P&gt;
&lt;P&gt;You need different variable names and values.&lt;/P&gt;
&lt;P&gt;See:&amp;nbsp;&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/n17wm229xfidj7n1nfx67jsb3yj5.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/n17wm229xfidj7n1nfx67jsb3yj5.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also see for overview :&amp;nbsp; &amp;nbsp;&lt;A href="https://support.sas.com/rnd/datavisualization/papers/Annotate_Your_SGPLOT_Graphs.pdf" target="_blank"&gt;https://support.sas.com/rnd/datavisualization/papers/Annotate_Your_SGPLOT_Graphs.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also note, you could easily use the VECTOR plot or SERIES plot in your use case.&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 21:40:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Need-help-with-Annotate-Arrow-Function/m-p/811762#M22818</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2022-05-05T21:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Annotate Arrow Function</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Need-help-with-Annotate-Arrow-Function/m-p/811853#M22819</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data plot_data;
input lat lon alt;
datalines;
34.0 -105.0 120
33.0 -104.0 120
;
run;

data arrow_data;
input latbeg lonbeg latend lonend;
datalines;
34.5 -105.5 34.0 -105.0
33.5 -104.5 33.0 -104.0
;
run;

data arrow_anno; set arrow_data;
function='arrow';
shape='filled';
layer='front';
linecolor='black';
linethickness=1;
drawspace='datavalue';
x1=lonbeg;
y1=latbeg;
x2=lonend;
y2=latend;
run;

proc sgplot data=plot_data sganno=arrow_anno aspect=1;
Title "Anno Arrow Test";
	scatter x=lon y=lat;
	xaxis grid min=-106 max=-103 minorgrid;
	yaxis grid min=30 max=35 minorgrid;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anno_arrow.png" style="width: 667px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71186iF2434FB84154C17F/image-size/large?v=v2&amp;amp;px=999" role="button" title="anno_arrow.png" alt="anno_arrow.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 12:25:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Need-help-with-Annotate-Arrow-Function/m-p/811853#M22819</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2022-05-06T12:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Annotate Arrow Function</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Need-help-with-Annotate-Arrow-Function/m-p/811870#M22824</link>
      <description>Yes, I get confused about the different syntax for the different annotate systems.  &lt;BR /&gt;&lt;BR /&gt;Thanks for your help,&lt;BR /&gt;&lt;BR /&gt;Gene</description>
      <pubDate>Fri, 06 May 2022 14:38:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Need-help-with-Annotate-Arrow-Function/m-p/811870#M22824</guid>
      <dc:creator>genemroz</dc:creator>
      <dc:date>2022-05-06T14:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Annotate Arrow Function</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Need-help-with-Annotate-Arrow-Function/m-p/946808#M25059</link>
      <description>&lt;P&gt;Unless you really need to use annotation data, another method could be using Symbolchar statement to create the arrow sign you want. You can use textattrs and scale to fine tuning the arrow shape. There are more than 100 arrow shapes from Unicode. If you go to &lt;A href="https://en.wikipedia.org/wiki/Arrows_(Unicode_block)" target="_blank"&gt;https://en.wikipedia.org/wiki/Arrows_(Unicode_block)&lt;/A&gt; you can choose one as you need.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then use the scatter statement to put the arrow(s) as you want. If you need to attach it to real data, just create the location of the x value(s) of the arrow and the y value(s). Yes, of course, you can change the arrow shape with markerattrs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry, I can't give you the actual code, but you already use scatter statement so it won't be hard, I think. Add markerattrs, name, legendlabel if you need to make your plot look more explainable. I am trying not to use annotation as much as possible unless it's definitely necessary to use.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 16:24:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Need-help-with-Annotate-Arrow-Function/m-p/946808#M25059</guid>
      <dc:creator>BAGaucho</dc:creator>
      <dc:date>2024-10-09T16:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Annotate Arrow Function</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Need-help-with-Annotate-Arrow-Function/m-p/946878#M25060</link>
      <description>&lt;P&gt;Or, you can use the VECTOR statement in SGPLOT procedure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/p1wtsx90517bf4n12fpaaeh6za0l.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/p1wtsx90517bf4n12fpaaeh6za0l.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 23:35:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Need-help-with-Annotate-Arrow-Function/m-p/946878#M25060</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2024-10-09T23:35:04Z</dc:date>
    </item>
  </channel>
</rss>

