<?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 get multiple linestyles in same sgplot graph ? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-multiple-linestyles-in-same-sgplot-graph/m-p/251549#M9100</link>
    <description>&lt;P&gt;Good catch. &amp;nbsp;I missed that part that LINEATTRS is specified. &amp;nbsp;It is also preferable to NOT use patterns by numbers as you may not get good results. &amp;nbsp;Please only use the named patterns defined in the software documentation.&lt;/P&gt;</description>
    <pubDate>Mon, 22 Feb 2016 14:51:31 GMT</pubDate>
    <dc:creator>Jay54</dc:creator>
    <dc:date>2016-02-22T14:51:31Z</dc:date>
    <item>
      <title>How to get multiple linestyles in same sgplot graph ?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-multiple-linestyles-in-same-sgplot-graph/m-p/251538#M9097</link>
      <description>&lt;P&gt;I have 4 treatment groups to be displayed in the graph. I need different linestyles (solid, dashed, etc ..) for each treatment group.&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the below code which I have written, I'm getting same linestyle for all 4.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to use the linestyle option in sgplot ? Please enlighten me. I am a beginner. Thanks&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sgplot data = final noautolegend;&lt;BR /&gt;xaxis label = 'Week';&lt;BR /&gt;yaxis label = 'Blood Pressure (mmHg)';&lt;BR /&gt;&lt;BR /&gt;series x = visitname y = mean / group = trtp lineattrs = (pattern = 1) markers;&lt;BR /&gt;keylegend/ title = 'Treatment ';&lt;BR /&gt;scatter x = visitname y = mean / group = trtp yerrorlower = lower&lt;BR /&gt;yerrorupper = upper ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thankyou&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2016 14:06:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-get-multiple-linestyles-in-same-sgplot-graph/m-p/251538#M9097</guid>
      <dc:creator>bobbyc</dc:creator>
      <dc:date>2016-02-22T14:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to get multiple linestyles in same sgplot graph ?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-multiple-linestyles-in-same-sgplot-graph/m-p/251539#M9098</link>
      <description>&lt;P&gt;Starting with SAS 9.3, the default style for HTML destination is HTMLBLUE. &amp;nbsp;This uses a "Color" priority algorithm to cycle through the attributes such as color, line pattern and symbol. &amp;nbsp;If you have SAS 9.3, use some other style, like LISTING.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have SAS 9.4 and want to keep the HTMLBlue style , but change the attribute assignment, set ATTRPRIORITY=NONE on the ODS Graphics statement. &amp;nbsp;This will cycle through color and line patterns for each group.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See this article for more information on ATTRPRIORITY: &amp;nbsp;&lt;A href="http://blogs.sas.com/content/graphicallyspeaking/2015/06/28/attributes-priority-for-the-inquiring-mind/" target="_blank"&gt;http://blogs.sas.com/content/graphicallyspeaking/2015/06/28/attributes-priority-for-the-inquiring-mind/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2016 14:14:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-get-multiple-linestyles-in-same-sgplot-graph/m-p/251539#M9098</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2016-02-22T14:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to get multiple linestyles in same sgplot graph ?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-multiple-linestyles-in-same-sgplot-graph/m-p/251543#M9099</link>
      <description>&lt;P&gt;Hello, I agree with Sanjay's comments. Just wanted to also mention that the reason why you are getting the same linestyle for each treatment is because you are using this option "lineattrs = (pattern = 1)". If you remove that code from the options (and assuming you are creating listing or rtf output) than you will automatically get different linestyles for each treatment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you wanted to also specify the exact color and linestyle that each treatment should have than you can do this with the discrete attributes map statements. &lt;A href="http://blogs.sas.com/content/graphicallyspeaking/2013/04/06/attributes-map-2/" target="_blank"&gt;http://blogs.sas.com/content/graphicallyspeaking/2013/04/06/attributes-map-2/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2016 14:39:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-get-multiple-linestyles-in-same-sgplot-graph/m-p/251543#M9099</guid>
      <dc:creator>djrisks</dc:creator>
      <dc:date>2016-02-22T14:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to get multiple linestyles in same sgplot graph ?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-multiple-linestyles-in-same-sgplot-graph/m-p/251549#M9100</link>
      <description>&lt;P&gt;Good catch. &amp;nbsp;I missed that part that LINEATTRS is specified. &amp;nbsp;It is also preferable to NOT use patterns by numbers as you may not get good results. &amp;nbsp;Please only use the named patterns defined in the software documentation.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2016 14:51:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-get-multiple-linestyles-in-same-sgplot-graph/m-p/251549#M9100</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2016-02-22T14:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to get multiple linestyles in same sgplot graph ?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-multiple-linestyles-in-same-sgplot-graph/m-p/251551#M9101</link>
      <description>Thanks Sanjay. This helped me to learn something new.</description>
      <pubDate>Mon, 22 Feb 2016 14:53:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-get-multiple-linestyles-in-same-sgplot-graph/m-p/251551#M9101</guid>
      <dc:creator>bobbyc</dc:creator>
      <dc:date>2016-02-22T14:53:48Z</dc:date>
    </item>
  </channel>
</rss>

