<?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 draw a line to represent the difference in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-to-draw-a-line-to-represent-the-difference/m-p/8558#M52</link>
    <description>Thank you very much. It works perfectly!</description>
    <pubDate>Tue, 15 Feb 2011 16:37:16 GMT</pubDate>
    <dc:creator>lueryy2000</dc:creator>
    <dc:date>2011-02-15T16:37:16Z</dc:date>
    <item>
      <title>How to draw a line to represent the difference</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-draw-a-line-to-represent-the-difference/m-p/8556#M50</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I have some data which I want to plot the difference between test1 and test2. Below is my data&lt;BR /&gt;
ID	test1	test2&lt;BR /&gt;
1	7	7&lt;BR /&gt;
2	4	5&lt;BR /&gt;
3	13	16&lt;BR /&gt;
4	12	14&lt;BR /&gt;
5	5	6&lt;BR /&gt;
6	13	16&lt;BR /&gt;
7	12	10&lt;BR /&gt;
8	18	20&lt;BR /&gt;
9	16	16&lt;BR /&gt;
10	11	12&lt;BR /&gt;
11	14	15&lt;BR /&gt;
12	11	11&lt;BR /&gt;
13	16	17&lt;BR /&gt;
14	18	16&lt;BR /&gt;
15	14	15&lt;BR /&gt;
16	17	18&lt;BR /&gt;
&lt;BR /&gt;
First, I get a scatterplot of test1 and test2. To make the difference clearer, I want to draw a line to represent the difference. For example, for ID 2, test1=4, test2=5, my code only give two points at 4 and 5, and I also want to connect 4 and 5. Can anybody help me with this? Here is my code:&lt;BR /&gt;
&lt;BR /&gt;
symbol1 v=diamond i=none c=blue l=1.2;&lt;BR /&gt;
symbol3 v=triangle i=none c=red l=1.2;&lt;BR /&gt;
proc gplot data=mydata;&lt;BR /&gt;
   plot (test1 test2)*ID / overlay;&lt;BR /&gt;
run;&lt;BR /&gt;
quit; &lt;BR /&gt;
&lt;BR /&gt;
Thanks very much,&lt;BR /&gt;
Lu</description>
      <pubDate>Fri, 11 Feb 2011 20:31:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-draw-a-line-to-represent-the-difference/m-p/8556#M50</guid>
      <dc:creator>lueryy2000</dc:creator>
      <dc:date>2011-02-11T20:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to draw a line to represent the difference</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-draw-a-line-to-represent-the-difference/m-p/8557#M51</link>
      <description>You can try using annotated dataset. &lt;BR /&gt;
&lt;BR /&gt;
data ant;&lt;BR /&gt;
	set mydata;&lt;BR /&gt;
	length function color $8;&lt;BR /&gt;
	retain xsys ysys '2' hsys '3';&lt;BR /&gt;
	function='move'; x=id; y=test1; output;&lt;BR /&gt;
	function='draw'; color='black'; line=1; size=0.2; x=id; y=test2; output;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
symbol1 v=diamond i=none c=blue l=1.2;&lt;BR /&gt;
symbol3 v=triangle i=none c=red l=1.2;&lt;BR /&gt;
proc gplot data=mydata;&lt;BR /&gt;
plot (test1 test2)*ID / overlay annotate=ant; &lt;BR /&gt;
run;&lt;BR /&gt;
quit;</description>
      <pubDate>Mon, 14 Feb 2011 21:21:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-draw-a-line-to-represent-the-difference/m-p/8557#M51</guid>
      <dc:creator>NickR</dc:creator>
      <dc:date>2011-02-14T21:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to draw a line to represent the difference</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-draw-a-line-to-represent-the-difference/m-p/8558#M52</link>
      <description>Thank you very much. It works perfectly!</description>
      <pubDate>Tue, 15 Feb 2011 16:37:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-draw-a-line-to-represent-the-difference/m-p/8558#M52</guid>
      <dc:creator>lueryy2000</dc:creator>
      <dc:date>2011-02-15T16:37:16Z</dc:date>
    </item>
  </channel>
</rss>

