<?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: Adding in the Date When Creating an Animation in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Adding-in-the-Date-When-Creating-an-Animation/m-p/578158#M18595</link>
    <description>Where do you want the date? On the graph in a corner, in the footnote/title, at the end of the line if a time series?</description>
    <pubDate>Wed, 31 Jul 2019 17:52:35 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-07-31T17:52:35Z</dc:date>
    <item>
      <title>Adding in the Date When Creating an Animation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-in-the-Date-When-Creating-an-Animation/m-p/578155#M18594</link>
      <description>&lt;P&gt;If I have created an animation and it is working, how do I add the date for each image so it changes as the animation is performed? I am using BASE sas. Is there a way to do this in the code used for animating?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options papersize=('11 in', '7 in') 
printerpath=gif 
animation=start 
animduration=0.7 
animloop=yes 
noanimoverlay
nodate;
ods printer file='C:/Users/lindsey/Documents/Gifs/all-appearance.gif';&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Jul 2019 17:23:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-in-the-Date-When-Creating-an-Animation/m-p/578155#M18594</guid>
      <dc:creator>lindseyn</dc:creator>
      <dc:date>2019-07-31T17:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Adding in the Date When Creating an Animation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-in-the-Date-When-Creating-an-Animation/m-p/578158#M18595</link>
      <description>Where do you want the date? On the graph in a corner, in the footnote/title, at the end of the line if a time series?</description>
      <pubDate>Wed, 31 Jul 2019 17:52:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-in-the-Date-When-Creating-an-Animation/m-p/578158#M18595</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-31T17:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Adding in the Date When Creating an Animation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-in-the-Date-When-Creating-an-Animation/m-p/578167#M18596</link>
      <description>&lt;P&gt;Preferably as a footnote!&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2019 18:17:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-in-the-Date-When-Creating-an-Animation/m-p/578167#M18596</guid>
      <dc:creator>lindseyn</dc:creator>
      <dc:date>2019-07-31T18:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: Adding in the Date When Creating an Animation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-in-the-Date-When-Creating-an-Animation/m-p/578168#M18597</link>
      <description>So you'll need to figure out a way to get that date, from your data -usually a macro variable and then include it in a footnote statement. If you show the rest of the code I can likely help with figuring out the date variable part. &lt;BR /&gt;&lt;BR /&gt;You can include that before your SGMAP or SGPLOT statements.&lt;BR /&gt;&lt;BR /&gt;footnote "Date: &amp;amp;myDate.";&lt;BR /&gt;</description>
      <pubDate>Wed, 31 Jul 2019 18:20:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-in-the-Date-When-Creating-an-Animation/m-p/578168#M18597</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-31T18:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: Adding in the Date When Creating an Animation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-in-the-Date-When-Creating-an-Animation/m-p/578194#M18598</link>
      <description>&lt;P&gt;This is my code. Thanks for all of your help!&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC IMPORT OUT=seven DATAFILE="C:/Users/lindsey/Documents/try7.csv" DBMS=CSV REPLACE;
GETNAMES=YES;
DATAROW=2; 
guessingrows=all;
RUN;

proc IMPORT out=full_week DATAFILE="C:/Users/lindsey/Documents/full_week.csv" DBMS=CSV REPLACE;
GETNAMES=YES;
DATAROW=2; 
guessingrows=all;
RUN;


%macro mapAnnually(dsn=, start=, end=);
   %let start=%sysfunc(inputn(&amp;amp;start,date9.));
   %let end=%sysfunc(inputn(&amp;amp;end,date9.));
   %let dif=%sysfunc(intck(day,&amp;amp;start,&amp;amp;end));
     %do i=0 %to &amp;amp;dif;
      %let date=%sysfunc(intnx(day,&amp;amp;start,&amp;amp;i,b));


		proc sgmap
		plotdata=&amp;amp;dsn noautolegend;
			openstreetmap;
	title 'flu outbreaks' x=Longitude y=Latitude/ markerattrs=(size=7 color=CX003399 
		symbol=circlefilled) transparency=0.32;

		run;

    %end;
%mend mapAnnually;

ods html close;



/*--Create animation--*/
options papersize=('11 in', '7 in') 
printerpath=gif 
animation=start 
animduration=0.7 
animloop=yes 
noanimoverlay
nodate;
ods printer file='C:/Users/lindsey/Documents/Gifs/NEW.gif';

ods graphics / width=10in height=6in imagefmt=GIF;

%mapAnnually(dsn=seven, start=01Jan2019, end = 07Jan2019);

options printerpath=gif animation=stop;
ods printer close;
ods html;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Jul 2019 19:32:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-in-the-Date-When-Creating-an-Animation/m-p/578194#M18598</guid>
      <dc:creator>lindseyn</dc:creator>
      <dc:date>2019-07-31T19:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Adding in the Date When Creating an Animation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-in-the-Date-When-Creating-an-Animation/m-p/578196#M18599</link>
      <description>You have no WHERE or filter in SG proc, so how does the picture change?&lt;BR /&gt;&lt;BR /&gt;Anyways, looks like there already is a macro variable so you can use that directly. &lt;BR /&gt;&lt;BR /&gt;footnote "Date: &amp;amp;date.";</description>
      <pubDate>Wed, 31 Jul 2019 19:36:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-in-the-Date-When-Creating-an-Animation/m-p/578196#M18599</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-31T19:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: Adding in the Date When Creating an Animation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-in-the-Date-When-Creating-an-Animation/m-p/578201#M18600</link>
      <description>&lt;P&gt;Whoops must have deleted it when I copied it over! So this worked, but the date is written as "21550" and then "21551.." any idea why?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2019 19:50:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-in-the-Date-When-Creating-an-Animation/m-p/578201#M18600</guid>
      <dc:creator>lindseyn</dc:creator>
      <dc:date>2019-07-31T19:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Adding in the Date When Creating an Animation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-in-the-Date-When-Creating-an-Animation/m-p/578202#M18601</link>
      <description>formats. &lt;BR /&gt;&lt;BR /&gt;footnote "Date: %sysfunc(putn(&amp;amp;date, worddate.)";</description>
      <pubDate>Wed, 31 Jul 2019 19:54:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-in-the-Date-When-Creating-an-Animation/m-p/578202#M18601</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-31T19:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: Adding in the Date When Creating an Animation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-in-the-Date-When-Creating-an-Animation/m-p/578209#M18602</link>
      <description>&lt;P&gt;I did this and the code barely ran and only gave me this note:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: The quoted string currently being processed has become more than 262 bytes long.  You might have unbalanced quotation marks.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Jul 2019 20:02:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-in-the-Date-When-Creating-an-Animation/m-p/578209#M18602</guid>
      <dc:creator>lindseyn</dc:creator>
      <dc:date>2019-07-31T20:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: Adding in the Date When Creating an Animation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-in-the-Date-When-Creating-an-Animation/m-p/578217#M18603</link>
      <description>Quotes are messed up somewhere then most likely &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; I can't see code or error so no idea.</description>
      <pubDate>Wed, 31 Jul 2019 20:20:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-in-the-Date-When-Creating-an-Animation/m-p/578217#M18603</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-31T20:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: Adding in the Date When Creating an Animation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-in-the-Date-When-Creating-an-Animation/m-p/578349#M18604</link>
      <description>&lt;P&gt;After restarting SAS, it worked! Thanks&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 11:49:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-in-the-Date-When-Creating-an-Animation/m-p/578349#M18604</guid>
      <dc:creator>lindseyn</dc:creator>
      <dc:date>2019-08-01T11:49:32Z</dc:date>
    </item>
  </channel>
</rss>

