<?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 show up with diff. Color in Title/SGPLOT in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-show-up-with-diff-Color-in-Title-SGPLOT/m-p/839189#M331819</link>
    <description>Thanks a huge</description>
    <pubDate>Tue, 18 Oct 2022 12:42:21 GMT</pubDate>
    <dc:creator>hellohere</dc:creator>
    <dc:date>2022-10-18T12:42:21Z</dc:date>
    <item>
      <title>How to show up with diff. Color in Title/SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-show-up-with-diff-Color-in-Title-SGPLOT/m-p/839157#M331804</link>
      <description>&lt;P&gt;I am plotting with SGPLOT and like to have words in diff. COLOR(base on value, if &amp;lt;0 then RED; else BLUE) in title.&lt;/P&gt;
&lt;P&gt;That way, dif4 should be RED and dif3 BLUE. How to do it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SGPlot398.png" style="width: 672px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76266iCB27718C520B54F2/image-size/large?v=v2&amp;amp;px=999" role="button" title="SGPlot398.png" alt="SGPlot398.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;29877      proc sql noprint;
29878      select md3y-md4y_ema_e into: dif_3y from &amp;amp;plotds. having ind=max(ind);
NOTE: The query requires remerging summary statistics back with the original data.
29879      select md4y-md4y_ema_e into: dif_4y from &amp;amp;plotds. having ind=max(ind);
NOTE: The query requires remerging summary statistics back with the original data.
29880      quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds


29881      title "&amp;amp;dt. dif4= &amp;amp;dif_4y. dif3=&amp;amp;dif_3y.";
29882      proc sgplot data=&amp;amp;plotds.;
29883      series x=ind y=fut;
29884      series x=ind y=md3y/y2axis lineattrs=(thickness=2 pattern=solid);
29885      series x=ind y=md3y_ema_e/y2axis lineattrs=(color=red thickness=2 pattern=solid);
29886      series x=ind y=md4y/y2axis  lineattrs=(thickness=2 pattern=solid);
29887      series x=ind y=md4y_ema_e/y2axis  lineattrs=(color=red thickness=1.5 pattern=solid);
29888      run;

29888!         quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Oct 2022 11:36:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-show-up-with-diff-Color-in-Title-SGPLOT/m-p/839157#M331804</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-10-18T11:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to show up with diff. Color in Title/SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-show-up-with-diff-Color-in-Title-SGPLOT/m-p/839159#M331805</link>
      <description>If put as label somewhere in PLOT/Chart, not in title, that is OK also!!!</description>
      <pubDate>Tue, 18 Oct 2022 11:37:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-show-up-with-diff-Color-in-Title-SGPLOT/m-p/839159#M331805</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-10-18T11:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to show up with diff. Color in Title/SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-show-up-with-diff-Color-in-Title-SGPLOT/m-p/839163#M331807</link>
      <description>&lt;P&gt;You want the text in the title to have different coloring, based on some condition, right?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 11:38:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-show-up-with-diff-Color-in-Title-SGPLOT/m-p/839163#M331807</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-10-18T11:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to show up with diff. Color in Title/SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-show-up-with-diff-Color-in-Title-SGPLOT/m-p/839166#M331809</link>
      <description>&lt;P&gt;Yes. Or anywhere in Chart.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 11:43:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-show-up-with-diff-Color-in-Title-SGPLOT/m-p/839166#M331809</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-10-18T11:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to show up with diff. Color in Title/SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-show-up-with-diff-Color-in-Title-SGPLOT/m-p/839171#M331812</link>
      <description>&lt;P&gt;It looks like a moving average.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp; wrote a blog about it.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 12:05:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-show-up-with-diff-Color-in-Title-SGPLOT/m-p/839171#M331812</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-10-18T12:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to show up with diff. Color in Title/SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-show-up-with-diff-Color-in-Title-SGPLOT/m-p/839177#M331814</link>
      <description>&lt;P&gt;Yes, it is MA.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Need to color-code the gap, either in title line, or label-alike(anywhere else).&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 12:13:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-show-up-with-diff-Color-in-Title-SGPLOT/m-p/839177#M331814</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-10-18T12:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to show up with diff. Color in Title/SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-show-up-with-diff-Color-in-Title-SGPLOT/m-p/839187#M331818</link>
      <description>&lt;P&gt;That is easy. How about this one ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let dt=1018;
%let dif_4y=-0.14;
%let dif_3y=0.35;




%let dif4=%sysfunc(ifc(&amp;amp;dif_4y.&amp;lt;0,red,blue));
%let dif3=%sysfunc(ifc(&amp;amp;dif_3y.&amp;lt;0,red,blue));
title "&amp;amp;dt. " color=&amp;amp;dif4 "dif4= &amp;amp;dif_4y. " color=&amp;amp;dif3 "dif3=&amp;amp;dif_3y.";
 proc sgplot data=sashelp.stocks;
 where stock='IBM';
series x=date y=close;
 run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1666096519681.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76273iDDC8531B05F3F8DD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1666096519681.png" alt="Ksharp_0-1666096519681.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 12:34:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-show-up-with-diff-Color-in-Title-SGPLOT/m-p/839187#M331818</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-10-18T12:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to show up with diff. Color in Title/SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-show-up-with-diff-Color-in-Title-SGPLOT/m-p/839189#M331819</link>
      <description>Thanks a huge</description>
      <pubDate>Tue, 18 Oct 2022 12:42:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-show-up-with-diff-Color-in-Title-SGPLOT/m-p/839189#M331819</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-10-18T12:42:21Z</dc:date>
    </item>
  </channel>
</rss>

