<?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: GPLOT: Overlay scatter and line in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/GPLOT-Overlay-scatter-and-line/m-p/15351#M295</link>
    <description>Cynthia, thank you for your detailed response!</description>
    <pubDate>Wed, 23 Feb 2011 15:40:46 GMT</pubDate>
    <dc:creator>statsplank</dc:creator>
    <dc:date>2011-02-23T15:40:46Z</dc:date>
    <item>
      <title>GPLOT: Overlay scatter and line</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/GPLOT-Overlay-scatter-and-line/m-p/15349#M293</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I'd appreciate it very much if somebody could help me with this.&lt;BR /&gt;
&lt;BR /&gt;
I have the following data set "data1":&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;horiz           vert             x               y&lt;BR /&gt;
&lt;BR /&gt;
   1     0.84501          0.1732          0.1732&lt;BR /&gt;
   2     0.77870         10.0000         10.0000&lt;BR /&gt;
   3     0.40234           .               .&lt;BR /&gt;
   4     0.51641           .               .&lt;BR /&gt;
   5     0.17316           .               .&lt;BR /&gt;
   6     0.71898           .               .&lt;BR /&gt;
   7     0.99211           .               .&lt;BR /&gt;
   8     0.19475           .               .&lt;BR /&gt;
   9     0.83093           .               .&lt;BR /&gt;
  10     0.96780           .              .&lt;/B&gt;&lt;BR /&gt;
 &lt;BR /&gt;
I would like to overlay a scatter plot and a line:&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;symbol1 v=none i=join;&lt;BR /&gt;
symbol2 v=dot i=none;&lt;BR /&gt;
proc gplot data=data1;&lt;BR /&gt;
   plot y*x vert*horiz /overlay skipmiss;&lt;BR /&gt;
run;&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
... and I do get a line but no scatter plot. Instead, it seems the &lt;B&gt;symbol1&lt;/B&gt; definition continues to apply to &lt;B&gt;vert*horiz&lt;/B&gt; as well.</description>
      <pubDate>Wed, 23 Feb 2011 00:34:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/GPLOT-Overlay-scatter-and-line/m-p/15349#M293</guid>
      <dc:creator>statsplank</dc:creator>
      <dc:date>2011-02-23T00:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: GPLOT: Overlay scatter and line</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/GPLOT-Overlay-scatter-and-line/m-p/15350#M294</link>
      <description>Hi:&lt;BR /&gt;
  The SYMBOL statement has a way of being used/re-used that is somewhat unique, as described here:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/graphref/63022/HTML/default/viewer.htm#symbolchap.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/graphref/63022/HTML/default/viewer.htm#symbolchap.htm&lt;/A&gt; Refer to the table in the section entitled, "Controlling Consecutive SYMBOL Statements" for an example of how you can have multiple SYMBOL statements, but SYMBOL2 will not be used until SYMBOL1 cycles through all the colors.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
  To have the most control over the SYMBOL statement one suggestion is :&lt;BR /&gt;
1) explicitly use a COLOR= or C= option to cause each SYMBOL to only be used 1 time &lt;BR /&gt;
 and, in addition, you can specifically link a plot with a symbol by referring to the number of the nth generated SYMBOL definition in your plot request statement as described here: &lt;A href="http://support.sas.com/documentation/cdl/en/graphref/63022/HTML/default/viewer.htm#gplot-plot.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/graphref/63022/HTML/default/viewer.htm#gplot-plot.htm&lt;/A&gt;&lt;BR /&gt;
and shown below.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
symbol1 v=none i=join c=black;&lt;BR /&gt;
symbol2 v=dot i=none c=blue;&lt;BR /&gt;
        &lt;BR /&gt;
proc gplot data=data1;&lt;BR /&gt;
  plot y*x=1 vert*horiz=2 /overlay skipmiss;&lt;BR /&gt;
run;&lt;BR /&gt;
quit;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Wed, 23 Feb 2011 02:51:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/GPLOT-Overlay-scatter-and-line/m-p/15350#M294</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-02-23T02:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: GPLOT: Overlay scatter and line</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/GPLOT-Overlay-scatter-and-line/m-p/15351#M295</link>
      <description>Cynthia, thank you for your detailed response!</description>
      <pubDate>Wed, 23 Feb 2011 15:40:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/GPLOT-Overlay-scatter-and-line/m-p/15351#M295</guid>
      <dc:creator>statsplank</dc:creator>
      <dc:date>2011-02-23T15:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: GPLOT: Overlay scatter and line</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/GPLOT-Overlay-scatter-and-line/m-p/15352#M296</link>
      <description>hi ... Cynthia gave you several solutions to your problem and also explained how SAS cycles through the COLOR list for the ouput destination being used for each SYMBOL statement before moving onto the next SYMBOL statement&lt;BR /&gt;
&lt;BR /&gt;
so when you write ...&lt;BR /&gt;
&lt;BR /&gt;
symbol1 v=none i=join;&lt;BR /&gt;
&lt;BR /&gt;
you are really writing MANY SYMBOL statemnts, one for each COLOR in the color list&lt;BR /&gt;
&lt;BR /&gt;
another solution (if you don't mind using one color for all symbols) is to restrict the color list by using a GOPTIONS statement ... this will also work and give you two symbols in your plot ...&lt;BR /&gt;
&lt;BR /&gt;
**************************************************&lt;BR /&gt;
goptions reset=all csymbol=blue;&lt;BR /&gt;
&lt;BR /&gt;
symbol1 v=none i=join;&lt;BR /&gt;
symbol2 v=dot i=none;&lt;BR /&gt;
&lt;BR /&gt;
proc gplot data=data1;&lt;BR /&gt;
plot y*x vert*horiz /overlay skipmiss;&lt;BR /&gt;
run;&lt;BR /&gt;
quit;&lt;BR /&gt;
**************************************************&lt;BR /&gt;
&lt;BR /&gt;
if you want to see the color list associated with a specific device, try PROC GDEVICE ... for example, for a GIF file ...&lt;BR /&gt;
&lt;BR /&gt;
* color list in OUTPUT window (with a LOT of other device attributes);&lt;BR /&gt;
proc gdevice c=sashelp.devices nofs;&lt;BR /&gt;
list gif;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
if you are using SAS in display manager mode in Windows and produce graphics in the graphics output winow, you can see the default color list in two way ...&lt;BR /&gt;
&lt;BR /&gt;
* color list in OUTPUT window;&lt;BR /&gt;
proc gdevice c=sashelp.devices nofs;&lt;BR /&gt;
list win;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
* color list in the LOG and truncated list in the graphics output window;&lt;BR /&gt;
proc gtestit;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
(you'll see a list of 38 colors in SAS 9.2)</description>
      <pubDate>Wed, 02 Mar 2011 16:43:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/GPLOT-Overlay-scatter-and-line/m-p/15352#M296</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2011-03-02T16:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: GPLOT: Overlay scatter and line</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/GPLOT-Overlay-scatter-and-line/m-p/15353#M297</link>
      <description>Thank you, Mike!&lt;BR /&gt;
&lt;BR /&gt;
These are excellent points and I learned a lot of new things about the GOPTIONS and colour selection in SAS from your post!&lt;BR /&gt;
&lt;BR /&gt;
Sincerely,&lt;BR /&gt;
Olga</description>
      <pubDate>Mon, 07 Mar 2011 19:19:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/GPLOT-Overlay-scatter-and-line/m-p/15353#M297</guid>
      <dc:creator>statsplank</dc:creator>
      <dc:date>2011-03-07T19:19:42Z</dc:date>
    </item>
  </channel>
</rss>

