<?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 Fun with SAS ODS Graphics: GIF Xmas Tree, GIF Xmas Tree... in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Fun-with-SAS-ODS-Graphics-GIF-Xmas-Tree-GIF-Xmas-Tree/m-p/708038#M20834</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GIF Xmas Tree, GIF Xmas Tree..." style="width: 576px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53000i96326AFBE743D582/image-size/large?v=v2&amp;amp;px=999" role="button" title="xmas2020.gif" alt="GIF Xmas Tree, GIF Xmas Tree..." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;GIF Xmas Tree, GIF Xmas Tree...&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A quick 2020 SAS ODS Graphics take on a &lt;A href="https://www.dezeen.com/2016/12/24/designer-christmas-cards-2016/" target="_self"&gt;neat 2016 Christmas card by Designjunction&lt;/A&gt;. Happy Holidays!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* Fun w/SAS ODS Graphics: GIF Xmas Tree, GIF Xmas Tree...
  An ODS Graphics take on a 2016 Xmas card by Designjunction at dezeen.com/2016/12/24/designer-christmas-cards-2016;
  
data tree;
do frame=0 to .95 by .05;                                                * Create 20 frames of scrolling bars (GIF will repeat);
  px=-10; py=16.5; output; px=10;py=-2.5; output; px=.;py=.;             * Set upper left, lower right bounds of data;
  do p=14.5 to .5 by -1;                                                 * White diagonal bars;
    id+1; y=p; x=-5; output; y=y-.3; x=5; output; y=y-.5; output; y=p-.5; x=-5; output;   
  end;  
  id=.; x=.; y=.;
  do p=(16.5-frame) to (-.5-frame) by -1;                                * Red horizontal bars;
    sid+1; sy=p; sx=-8; output; sx=8; output; sy=p-.5; output; sx=-8; output;
  end;
end;
 
proc template;                                                           * Define chart;
define statgraph xmas;
begingraph; 
layout overlayequated / xaxisopts=(offsetmin=0.001 offsetmax=0.001 display=none) 
                        yaxisopts=(offsetmin=0.001 offsetmax=0.001 display=none) walldisplay=none;
scatterplot x=px y=py / markerattrs=(size=0);                            * "Dummy" plot - set up chart bounds;
beginpolygon x=0 y=15 / drawspace=datavalue display=(fill) fillAttrs=(color=green) layer=back; 
             draw x=5 y=0; draw x=-5 y=0; endpolygon;                    * Draw static Xmas tree (triangle);
polygonplot x=x y=y id=id / display=(fill) fillattrs=(color=white);      * Draw static white diagonals thru tree; 
polygonplot x=sx y=sy id=sid / display=(fill) fillattrs=(color=red);     * Draw moving horizonatl slits; 
beginpolygon x=-8 y=16 / drawspace=datavalue display=(fill) fillAttrs=(color=white) layer=front; 
             draw x=8 y=16; draw x=8 y=17; draw x=-8 y=17; endpolygon;   * Mask off top of card (for "infinite scroll" of red bars);
beginpolygon x=-8 y=-1 / drawspace=datavalue display=(fill) fillAttrs=(color=white) layer=front; 
             draw x=8 y=-1; draw x=8 y=-2; draw x=-8 y=-2; endpolygon;    * Mask off bottom of card (for "infinite scroll" of red bars);   
entry textattrs=(size=14pt weight=bold color=green) "HAPPY HOLIDAYS!"/ valign=bottom;
endlayout;
endgraph;
end;
run;

ods _all_ close;                        * Animated GIF setup;
options papersize=('6 in', '6 in') printerpath=gif animation=start 
        nodate nonumber animloop=YES NOANIMOVERLAY animduration=.09;
ods printer file='/folders/myfolders/xmas2020.gif';
ods graphics on / reset antialias width=6in height=6in imagefmt=GIF;

options nobyline;
proc sgrender data=tree template=xmas;                                   * Generate Xmas card!;
by frame;
run;

options printerpath=gif animation=stop; * Animated GIF wrapup;
ods printer close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 24 Dec 2020 04:24:16 GMT</pubDate>
    <dc:creator>tc</dc:creator>
    <dc:date>2020-12-24T04:24:16Z</dc:date>
    <item>
      <title>Fun with SAS ODS Graphics: GIF Xmas Tree, GIF Xmas Tree...</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-with-SAS-ODS-Graphics-GIF-Xmas-Tree-GIF-Xmas-Tree/m-p/708038#M20834</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GIF Xmas Tree, GIF Xmas Tree..." style="width: 576px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53000i96326AFBE743D582/image-size/large?v=v2&amp;amp;px=999" role="button" title="xmas2020.gif" alt="GIF Xmas Tree, GIF Xmas Tree..." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;GIF Xmas Tree, GIF Xmas Tree...&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A quick 2020 SAS ODS Graphics take on a &lt;A href="https://www.dezeen.com/2016/12/24/designer-christmas-cards-2016/" target="_self"&gt;neat 2016 Christmas card by Designjunction&lt;/A&gt;. Happy Holidays!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* Fun w/SAS ODS Graphics: GIF Xmas Tree, GIF Xmas Tree...
  An ODS Graphics take on a 2016 Xmas card by Designjunction at dezeen.com/2016/12/24/designer-christmas-cards-2016;
  
data tree;
do frame=0 to .95 by .05;                                                * Create 20 frames of scrolling bars (GIF will repeat);
  px=-10; py=16.5; output; px=10;py=-2.5; output; px=.;py=.;             * Set upper left, lower right bounds of data;
  do p=14.5 to .5 by -1;                                                 * White diagonal bars;
    id+1; y=p; x=-5; output; y=y-.3; x=5; output; y=y-.5; output; y=p-.5; x=-5; output;   
  end;  
  id=.; x=.; y=.;
  do p=(16.5-frame) to (-.5-frame) by -1;                                * Red horizontal bars;
    sid+1; sy=p; sx=-8; output; sx=8; output; sy=p-.5; output; sx=-8; output;
  end;
end;
 
proc template;                                                           * Define chart;
define statgraph xmas;
begingraph; 
layout overlayequated / xaxisopts=(offsetmin=0.001 offsetmax=0.001 display=none) 
                        yaxisopts=(offsetmin=0.001 offsetmax=0.001 display=none) walldisplay=none;
scatterplot x=px y=py / markerattrs=(size=0);                            * "Dummy" plot - set up chart bounds;
beginpolygon x=0 y=15 / drawspace=datavalue display=(fill) fillAttrs=(color=green) layer=back; 
             draw x=5 y=0; draw x=-5 y=0; endpolygon;                    * Draw static Xmas tree (triangle);
polygonplot x=x y=y id=id / display=(fill) fillattrs=(color=white);      * Draw static white diagonals thru tree; 
polygonplot x=sx y=sy id=sid / display=(fill) fillattrs=(color=red);     * Draw moving horizonatl slits; 
beginpolygon x=-8 y=16 / drawspace=datavalue display=(fill) fillAttrs=(color=white) layer=front; 
             draw x=8 y=16; draw x=8 y=17; draw x=-8 y=17; endpolygon;   * Mask off top of card (for "infinite scroll" of red bars);
beginpolygon x=-8 y=-1 / drawspace=datavalue display=(fill) fillAttrs=(color=white) layer=front; 
             draw x=8 y=-1; draw x=8 y=-2; draw x=-8 y=-2; endpolygon;    * Mask off bottom of card (for "infinite scroll" of red bars);   
entry textattrs=(size=14pt weight=bold color=green) "HAPPY HOLIDAYS!"/ valign=bottom;
endlayout;
endgraph;
end;
run;

ods _all_ close;                        * Animated GIF setup;
options papersize=('6 in', '6 in') printerpath=gif animation=start 
        nodate nonumber animloop=YES NOANIMOVERLAY animduration=.09;
ods printer file='/folders/myfolders/xmas2020.gif';
ods graphics on / reset antialias width=6in height=6in imagefmt=GIF;

options nobyline;
proc sgrender data=tree template=xmas;                                   * Generate Xmas card!;
by frame;
run;

options printerpath=gif animation=stop; * Animated GIF wrapup;
ods printer close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Dec 2020 04:24:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-with-SAS-ODS-Graphics-GIF-Xmas-Tree-GIF-Xmas-Tree/m-p/708038#M20834</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2020-12-24T04:24:16Z</dc:date>
    </item>
  </channel>
</rss>

