<?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 Add Symbols Sparsely in PROC GPLOT? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-Add-Symbols-Sparsely-in-PROC-GPLOT/m-p/563028#M157789</link>
    <description>&lt;P&gt;You could create another variable that is missing on most of the records from the existing value and assign a symbol that is only the marker, no interpolation&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data _;
do t=1 to 1000;
x+rannor(1);
y+rannor(1);
z+rannor(1);
/* set value for only a few values of the X*/
if mod(t,50)=0 then q=x;
else q=.;
output;
end;
run;
symbol1 i=join ci=blue v=none cv=blue;
symbol2 i=join ci=red v=none cv=red;
symbol3 i=join ci=lime v=none cv=lime;
symbol4 i=none c=blue  v=dot ;
proc gplot;
plot (x y z q)*t/overlay;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And a similar plot with the&amp;nbsp;newer&amp;nbsp;SGPLOT&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=_;
   series x=t y=x/ lineattrs=(color=blue);
   series x=t y=y/ lineattrs=(color=red);
   series x=t y=z/ lineattrs=(color=lime);
   scatter x=t y=q/ markerattrs=(color=blue);
run;
   &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Note that axis labels are controlled differently. SGPLOT uses Xaxis and Yaxis statements and the syntax is different that the device based graphics AXIS statements though some items are similar. Also SGPLOT will add legends differently.&lt;/P&gt;</description>
    <pubDate>Fri, 31 May 2019 23:07:09 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-05-31T23:07:09Z</dc:date>
    <item>
      <title>How to Add Symbols Sparsely in PROC GPLOT?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Add-Symbols-Sparsely-in-PROC-GPLOT/m-p/563026#M157787</link>
      <description>&lt;P&gt;One can add symbols in PROC GPLOT as follows.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _;
do t=1 to 1000;
x+rannor(1);
y+rannor(1);
z+rannor(1);
output;
end;
run;
symbol1 i=join ci=blue v=dot cv=blue;
symbol2 i=join ci=red v=dot cv=red;
symbol3 i=join ci=lime v=dot cv=lime;
proc gplot;
plot (x y z)*t/overlay;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;And the following is the outcome.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="0.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/29941iC44CC1AB6A1FDA29/image-size/medium?v=v2&amp;amp;px=400" role="button" title="0.png" alt="0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But this is too dense if there are a lot of data points. Is it possible to add the symbols sparsely as follows?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/29942iE4FB0953ED1738C1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;For example, PAST WINNERS in the plot skips many observations and attaches the dots infrequently. Thanks in advance.&lt;/P&gt;&lt;P&gt;P.S. I wonder whether one can add something like the right-most dollar numbers in the sample plot to PROC GPLOT.&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2019 21:12:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Add-Symbols-Sparsely-in-PROC-GPLOT/m-p/563026#M157787</guid>
      <dc:creator>Junyong</dc:creator>
      <dc:date>2019-05-31T21:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to Add Symbols Sparsely in PROC GPLOT?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Add-Symbols-Sparsely-in-PROC-GPLOT/m-p/563028#M157789</link>
      <description>&lt;P&gt;You could create another variable that is missing on most of the records from the existing value and assign a symbol that is only the marker, no interpolation&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data _;
do t=1 to 1000;
x+rannor(1);
y+rannor(1);
z+rannor(1);
/* set value for only a few values of the X*/
if mod(t,50)=0 then q=x;
else q=.;
output;
end;
run;
symbol1 i=join ci=blue v=none cv=blue;
symbol2 i=join ci=red v=none cv=red;
symbol3 i=join ci=lime v=none cv=lime;
symbol4 i=none c=blue  v=dot ;
proc gplot;
plot (x y z q)*t/overlay;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And a similar plot with the&amp;nbsp;newer&amp;nbsp;SGPLOT&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=_;
   series x=t y=x/ lineattrs=(color=blue);
   series x=t y=y/ lineattrs=(color=red);
   series x=t y=z/ lineattrs=(color=lime);
   scatter x=t y=q/ markerattrs=(color=blue);
run;
   &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Note that axis labels are controlled differently. SGPLOT uses Xaxis and Yaxis statements and the syntax is different that the device based graphics AXIS statements though some items are similar. Also SGPLOT will add legends differently.&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2019 23:07:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Add-Symbols-Sparsely-in-PROC-GPLOT/m-p/563028#M157789</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-05-31T23:07:09Z</dc:date>
    </item>
  </channel>
</rss>

