<?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 coordination of dataset with splot procedure in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/coordination-of-dataset-with-splot-procedure/m-p/780935#M22333</link>
    <description>&lt;P&gt;&lt;STRONG&gt;SAS STUDIO Release: 3.8 (Enterprise Edition)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Is there a description of what form dataset should be in for sgplot and other s series plots? I have the following:&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=profile;
series x=brand y=response / group=subject;
run;&lt;/PRE&gt;
&lt;P&gt;I want a very simple profile plot of lifetime * brand for each subject connecting lines between brands for each subject.&lt;/P&gt;
&lt;P&gt;Is there a clue in this code as to what input form to use?&amp;nbsp; I usually use longform. I am finding all sorts of graphs out there with code but coordinating the data set with the procedure is another matter.&lt;/P&gt;
&lt;PRE&gt;DATA profile;
INPUT brand $ response;
subject=_n_;
DATALINES;
A  73
A  64
A  67 
B  81 
B  77
;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Nov 2021 04:42:38 GMT</pubDate>
    <dc:creator>MaryA_Marion</dc:creator>
    <dc:date>2021-11-18T04:42:38Z</dc:date>
    <item>
      <title>coordination of dataset with splot procedure</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/coordination-of-dataset-with-splot-procedure/m-p/780935#M22333</link>
      <description>&lt;P&gt;&lt;STRONG&gt;SAS STUDIO Release: 3.8 (Enterprise Edition)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Is there a description of what form dataset should be in for sgplot and other s series plots? I have the following:&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=profile;
series x=brand y=response / group=subject;
run;&lt;/PRE&gt;
&lt;P&gt;I want a very simple profile plot of lifetime * brand for each subject connecting lines between brands for each subject.&lt;/P&gt;
&lt;P&gt;Is there a clue in this code as to what input form to use?&amp;nbsp; I usually use longform. I am finding all sorts of graphs out there with code but coordinating the data set with the procedure is another matter.&lt;/P&gt;
&lt;PRE&gt;DATA profile;
INPUT brand $ response;
subject=_n_;
DATALINES;
A  73
A  64
A  67 
B  81 
B  77
;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 04:42:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/coordination-of-dataset-with-splot-procedure/m-p/780935#M22333</guid>
      <dc:creator>MaryA_Marion</dc:creator>
      <dc:date>2021-11-18T04:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: coordination of dataset with splot procedure</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/coordination-of-dataset-with-splot-procedure/m-p/781001#M22334</link>
      <description>&lt;P&gt;Post moved by me to Graphics board (coming from Visual Analytics board).&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 12:31:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/coordination-of-dataset-with-splot-procedure/m-p/781001#M22334</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-11-18T12:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: coordination of dataset with splot procedure</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/coordination-of-dataset-with-splot-procedure/m-p/781003#M22335</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With series statement in proc sgplot an a unique subject (subject only occurring once) you do not see anything as there's no marker by default and there's nothing to connect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you want something like the below :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA profile;
INPUT brand $ response subject $;
*subject=_n_;
DATALINES;
A  73 1
A  64 2
A  67 3
B  81 1
B  77 2
;
run;

proc sgplot data=profile;
series  x=brand y=response / group=subject;
scatter x=brand y=response / group=subject;
run;
/* end of program */&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 12:35:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/coordination-of-dataset-with-splot-procedure/m-p/781003#M22335</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-11-18T12:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: coordination of dataset with splot procedure</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/coordination-of-dataset-with-splot-procedure/m-p/781020#M22337</link>
      <description>&lt;P&gt;Solution found. I was trying to enter subject numbers easily. They were not correct and all subsequent graphs were incorrect. I went back to the old technique of using scatter and series statements.&lt;/P&gt;
&lt;PRE&gt;DATA profile;&lt;BR /&gt;INPUT subject brand $ response;&lt;BR /&gt;DATALINES;&lt;BR /&gt;1 A  73&lt;BR /&gt;2 A  64&lt;BR /&gt;3 A  67 &lt;BR /&gt;1 B  81 &lt;BR /&gt;2 B  77&lt;BR /&gt;;&lt;BR /&gt;proc sgplot data=profile; &lt;BR /&gt;scatter x=brand y=response / group=subject; &lt;BR /&gt;series x=brand y=response / group=subject; &lt;BR /&gt;run; &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 14:11:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/coordination-of-dataset-with-splot-procedure/m-p/781020#M22337</guid>
      <dc:creator>MaryA_Marion</dc:creator>
      <dc:date>2021-11-18T14:11:36Z</dc:date>
    </item>
  </channel>
</rss>

