<?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: SGPLOT Y-AXIS Scale in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SGPLOT-Y-AXIS-Scale/m-p/821843#M324487</link>
    <description>&lt;P&gt;Great, this is working great. Thank you so much Rick.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Jul 2022 13:52:01 GMT</pubDate>
    <dc:creator>Sairampulipati</dc:creator>
    <dc:date>2022-07-06T13:52:01Z</dc:date>
    <item>
      <title>SGPLOT Y-AXIS Scale</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SGPLOT-Y-AXIS-Scale/m-p/821618#M324384</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following sample data pchg has both positive and negative values ranging from -100 to 1000. I wanted plot a spaghetti plot and to have legend as cohort and each cohort has unique color irrespective of number of subjects in it. I am using the following code but unable to do coloring by cohort, is there any option in series line group = id, cohort. or is there any other option plot by id but color code by cohort and legend to be cohort.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc sgplot data=dta;
format visitc $visitfmt.;
series x=visitc y=pchg / group=id lineattrs=(pattern=solid thickness=1) break markers markerattrs=(symbol=circlefilled size=1.5);
xaxis type=discrete label='Visits' offsetmax=0.02 offsetmin=0.02;
yaxis label='Percent Change' ;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="c1.png" style="width: 591px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/72928i1FD8BFB3A7814ACC/image-size/large?v=v2&amp;amp;px=999" role="button" title="c1.png" alt="c1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;circlefilled option is not getting applied and hard to read this graph.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 14:58:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SGPLOT-Y-AXIS-Scale/m-p/821618#M324384</guid>
      <dc:creator>Sairampulipati</dc:creator>
      <dc:date>2022-07-05T14:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT Y-AXIS Scale</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SGPLOT-Y-AXIS-Scale/m-p/821641#M324391</link>
      <description>&lt;P&gt;You'll probably want to control the colours manually in this case.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use a data attribute map to assign colours.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're not sure of what colours to use, I would suggest getting a set of 12 different colours from here and assign them as needed.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://colorbrewer2.org/#type=qualitative&amp;amp;scheme=Paired&amp;amp;n=12" target="_blank"&gt;https://colorbrewer2.org/#type=qualitative&amp;amp;scheme=Paired&amp;amp;n=12&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 16:08:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SGPLOT-Y-AXIS-Scale/m-p/821641#M324391</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-07-05T16:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT Y-AXIS Scale</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SGPLOT-Y-AXIS-Scale/m-p/821662#M324400</link>
      <description>&lt;P&gt;Use &lt;A href="https://blogs.sas.com/content/iml/2016/06/02/create-spaghetti-plots-in-sas.html" target="_self"&gt;the GROUPLC= option&lt;/A&gt; to specify that the line colors should be set by using the COHORT variable instead of the ID variable:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=dta;
   *format visitc $visitfmt.;
   series x=visitc y=pchg / group=id GROUPLC=COHORT
          lineattrs=(pattern=solid thickness=1) 
          break markers markerattrs=(symbol=circlefilled size=2);
   xaxis type=discrete label='Visits' offsetmax=0.02 offsetmin=0.02;
   yaxis label='Percent Change' ;
   keylegend / type=linecolor title="";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can also use the TYPE=LINECOLOR option on the KEYLEGEND statement to add a legend for the cohorts.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 19:05:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SGPLOT-Y-AXIS-Scale/m-p/821662#M324400</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2022-07-05T19:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT Y-AXIS Scale</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SGPLOT-Y-AXIS-Scale/m-p/821836#M324481</link>
      <description>&lt;P&gt;Thank you very much Rick. This is working but somehow circle filled is not populating in the figure. Do you have any suggestions please.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sairampulipati_0-1657114776520.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/72979iAC38AA00705AE8CE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sairampulipati_0-1657114776520.png" alt="Sairampulipati_0-1657114776520.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 13:39:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SGPLOT-Y-AXIS-Scale/m-p/821836#M324481</guid>
      <dc:creator>Sairampulipati</dc:creator>
      <dc:date>2022-07-06T13:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT Y-AXIS Scale</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SGPLOT-Y-AXIS-Scale/m-p/821842#M324486</link>
      <description>&lt;P&gt;use SIZE=6 instead of SIZE=2.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 13:46:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SGPLOT-Y-AXIS-Scale/m-p/821842#M324486</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2022-07-06T13:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT Y-AXIS Scale</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SGPLOT-Y-AXIS-Scale/m-p/821843#M324487</link>
      <description>&lt;P&gt;Great, this is working great. Thank you so much Rick.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 13:52:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SGPLOT-Y-AXIS-Scale/m-p/821843#M324487</guid>
      <dc:creator>Sairampulipati</dc:creator>
      <dc:date>2022-07-06T13:52:01Z</dc:date>
    </item>
  </channel>
</rss>

