<?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 change line colors with different groups and different points in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/how-to-change-line-colors-with-different-groups-and-different/m-p/365191#M12710</link>
    <description>&lt;P&gt;First, you can delete the SCATTER statements because the LOESS statements draw the markers. (Move the MARKERATTRS= option into the LOESS statement to control the marker attributes.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't understand your question. What colors do you want for each line?&lt;/P&gt;
&lt;P&gt;1. Y=TimePoint1, group=TX&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Y=TimePoint1, group=cont&lt;/P&gt;
&lt;P&gt;3. Y=TimePoint2, group=TX&lt;/P&gt;
&lt;P&gt;4. Y=TimePoint2, group=cont&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jun 2017 23:19:03 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2017-06-07T23:19:03Z</dc:date>
    <item>
      <title>how to change line colors with different groups and different points</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-change-line-colors-with-different-groups-and-different/m-p/365180#M12708</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to draw figures with lines shown in the attachment file.&amp;nbsp;&amp;nbsp;As you can see, there are four lines totally, Two red lines represents CONT group, timepoint1 and timepoint2, seperately, but I want these two lines with different colors.&lt;/P&gt;&lt;P&gt;The same problem with TX group (two blue lines). I tried to use series statement, but that doesn't work. Any clues or idea?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;proc sgplot data=want;&lt;BR /&gt;loess x = age_1 y = timepoint1 / group = group interpolation = cubic degree = 2;&lt;BR /&gt;loess x = age_2 y = timepoint2 / group = group interpolation = cubic degree = 2;&lt;BR /&gt;scatter x = age_1 y = timepoint1 / group = group markerattrs = (symbol = SquareFilled );&lt;BR /&gt;scatter x = age_2 y = timepoint2 / group = group markerattrs = (symbol = CircleFilled);&lt;BR /&gt;vector x = age_2 y = timepoint2 / xorigin = age_1 yorigin = timepoint1 group = group arrowheadshape = filled;&lt;BR /&gt;xaxis label="Age" labelattrs = (size = 12);&lt;BR /&gt;yaxis label="Result" labelattrs = (size = 12);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my dataset:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;timepoint1&lt;/TD&gt;&lt;TD&gt;timepoint2&lt;/TD&gt;&lt;TD&gt;age_1&lt;/TD&gt;&lt;TD&gt;age_2&lt;/TD&gt;&lt;TD&gt;Group&lt;/TD&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;75.745315&lt;/TD&gt;&lt;TD&gt;57.564039&lt;/TD&gt;&lt;TD&gt;15.8&lt;/TD&gt;&lt;TD&gt;17&lt;/TD&gt;&lt;TD&gt;TX&lt;/TD&gt;&lt;TD&gt;14468&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;62.844542&lt;/TD&gt;&lt;TD&gt;61.26036&lt;/TD&gt;&lt;TD&gt;15.1&lt;/TD&gt;&lt;TD&gt;16.1&lt;/TD&gt;&lt;TD&gt;TX&lt;/TD&gt;&lt;TD&gt;15597&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;40.134801&lt;/TD&gt;&lt;TD&gt;40.798897&lt;/TD&gt;&lt;TD&gt;9.2&lt;/TD&gt;&lt;TD&gt;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D&gt;50.019989&lt;/TD&gt;&lt;TD&gt;14&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;cont&lt;/TD&gt;&lt;TD&gt;23111&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;72.168422&lt;/TD&gt;&lt;TD&gt;45.670534&lt;/TD&gt;&lt;TD&gt;11.1&lt;/TD&gt;&lt;TD&gt;12.1&lt;/TD&gt;&lt;TD&gt;cont&lt;/TD&gt;&lt;TD&gt;24089&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;46.036243&lt;/TD&gt;&lt;TD&gt;50.30168&lt;/TD&gt;&lt;TD&gt;12.8&lt;/TD&gt;&lt;TD&gt;13.8&lt;/TD&gt;&lt;TD&gt;cont&lt;/TD&gt;&lt;TD&gt;24336&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;80.433347&lt;/TD&gt;&lt;TD&gt;77.736575&lt;/TD&gt;&lt;TD&gt;16.6&lt;/TD&gt;&lt;TD&gt;17.6&lt;/TD&gt;&lt;TD&gt;cont&lt;/TD&gt;&lt;TD&gt;25996&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;56.225566&lt;/TD&gt;&lt;TD&gt;33.983688&lt;/TD&gt;&lt;TD&gt;8.7&lt;/TD&gt;&lt;TD&gt;9.7&lt;/TD&gt;&lt;TD&gt;cont&lt;/TD&gt;&lt;TD&gt;26438&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;C&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2017 20:56:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-change-line-colors-with-different-groups-and-different/m-p/365180#M12708</guid>
      <dc:creator>echoli</dc:creator>
      <dc:date>2017-06-07T20:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to change line colors with different groups and different points</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-change-line-colors-with-different-groups-and-different/m-p/365186#M12709</link>
      <description>&lt;P&gt;Have you looked at STYLEATTRS statement (first in SGPLOT documentation) or an Attribute Map?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is old, but I think it's still valid:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/iml/2012/10/17/specify-the-colors-of-groups-in-sas-statistical-graphics.html" target="_blank"&gt;http://blogs.sas.com/content/iml/2012/10/17/specify-the-colors-of-groups-in-sas-statistical-graphics.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2017 22:20:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-change-line-colors-with-different-groups-and-different/m-p/365186#M12709</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-06-07T22:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to change line colors with different groups and different points</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-change-line-colors-with-different-groups-and-different/m-p/365191#M12710</link>
      <description>&lt;P&gt;First, you can delete the SCATTER statements because the LOESS statements draw the markers. (Move the MARKERATTRS= option into the LOESS statement to control the marker attributes.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't understand your question. What colors do you want for each line?&lt;/P&gt;
&lt;P&gt;1. Y=TimePoint1, group=TX&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Y=TimePoint1, group=cont&lt;/P&gt;
&lt;P&gt;3. Y=TimePoint2, group=TX&lt;/P&gt;
&lt;P&gt;4. Y=TimePoint2, group=cont&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2017 23:19:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-change-line-colors-with-different-groups-and-different/m-p/365191#M12710</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-06-07T23:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: how to change line colors with different groups and different points</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-change-line-colors-with-different-groups-and-different/m-p/365192#M12711</link>
      <description>&lt;P&gt;First, you can delete the SCATTER statements because the LOESS statements draw the markers. (Move the MARKERATTRS= option into the LOESS statement to control the marker attributes.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't understand your question. What colors do you want for each line?&lt;/P&gt;
&lt;P&gt;1. Y=TimePoint1, group=TX&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Y=TimePoint1, group=cont&lt;/P&gt;
&lt;P&gt;3. Y=TimePoint2, group=TX&lt;/P&gt;
&lt;P&gt;4. Y=TimePoint2, group=cont&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2017 23:19:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-change-line-colors-with-different-groups-and-different/m-p/365192#M12711</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-06-07T23:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: how to change line colors with different groups and different points</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-change-line-colors-with-different-groups-and-different/m-p/365193#M12712</link>
      <description>Hi Rick,&lt;BR /&gt;Yes, 1,2,3,4 are the four lines I want. I want four lines with four different colors. In my picture, 1 and 2 have the same color, 3 and 4 have the same color. That's what I want to solve.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;C&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Jun 2017 23:26:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-change-line-colors-with-different-groups-and-different/m-p/365193#M12712</guid>
      <dc:creator>echoli</dc:creator>
      <dc:date>2017-06-07T23:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: how to change line colors with different groups and different points</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-change-line-colors-with-different-groups-and-different/m-p/365196#M12713</link>
      <description>&lt;P&gt;And do you want colors that are in any way related to the red/blue colors of the VECTOR plot? Or do you want different colors, such as&amp;nbsp;purple, green, gold, and black?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2017 23:54:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-change-line-colors-with-different-groups-and-different/m-p/365196#M12713</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-06-07T23:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: how to change line colors with different groups and different points</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-change-line-colors-with-different-groups-and-different/m-p/365197#M12714</link>
      <description>Hi Rick,&lt;BR /&gt;&lt;BR /&gt;In my picture, there are four kinds of data points, matched with 1, 2, 3, 4 you helped me list in the reply. I want four colors for these four kinds of data points, and also four lines matched with same colors.&lt;BR /&gt;Like in the vector statement, I want X, Y, Xorigin, Yorigin have different colors, is that possible? Also, the four lines create by X, Y, xorigin, yorigin columns in Loess statement should match same colors as vector statement.&lt;BR /&gt;Is my explain clear?&lt;BR /&gt;Thanks so much for your patience to help me!&lt;BR /&gt;&lt;BR /&gt;C&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Jun 2017 00:12:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-change-line-colors-with-different-groups-and-different/m-p/365197#M12714</guid>
      <dc:creator>echoli</dc:creator>
      <dc:date>2017-06-08T00:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to change line colors with different groups and different points</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-change-line-colors-with-different-groups-and-different/m-p/365381#M12715</link>
      <description>&lt;P&gt;Try specifying CYCLEATTRS on the SGPLOT procedure statement and see if that gives you what you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2017 13:58:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-change-line-colors-with-different-groups-and-different/m-p/365381#M12715</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2017-06-08T13:58:18Z</dc:date>
    </item>
  </channel>
</rss>

