BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
user24feb
Barite | Level 11

Hello,

 

I am trying to create an animated SGPlot-plot following the instructions on http://support.sas.com/documentation/cdl/en/graphref/67881/HTML/default/viewer.htm#p0akj7ltqqbhqun1n... - or not following the instructions if you will (because it does not work).

 

I would like the plot to be build in 3 steps. How can I put the code right?

 

Data A (Drop=i);
  Retain Date '01JAN2000'd; Format Date Date9.;
  Do i=1 To 100;
    Date=IntNX('month',Date,1,'same');
	Value=Rand('uniform')+1;
	Output;
  End;
Run;

Options Animduration=10
        Animloop=YES
        Animoverlay;
Options Animate=START;
ODS HTML File='C:\Test.HTML';
Proc SGPlot Data=A (Where=(Date lt '01JAN2003'd));
  Series X=Date Y=Value;
  YAxis Min=0;
  XAxis Max='01JAN2010'd;
Run;
Proc SGPlot Data=A (Where=(Date lt '01JAN2006'd));
  Series X=Date Y=Value;
  YAxis Min=0;
  XAxis Max='01JAN2010'd;
Run;
Proc SGPlot Data=A;
  Series X=Date Y=Value;
  YAxis Min=0;
  XAxis Max='01JAN2010'd;
Run;
Options Animate=STOP;
ODS HTML Close;

 

 

Thanks&kind regards

1 ACCEPTED SOLUTION

Accepted Solutions
Jay54
Meteorite | Level 14

See animation example here:  http://blogs.sas.com/content/graphicallyspeaking/2013/05/23/animation-using-sgplot/

GIF animations can be created using the options shown.  You will have to create successive graphs with the animation you want.

View solution in original post

2 REPLIES 2
Jay54
Meteorite | Level 14

See animation example here:  http://blogs.sas.com/content/graphicallyspeaking/2013/05/23/animation-using-sgplot/

GIF animations can be created using the options shown.  You will have to create successive graphs with the animation you want.

user24feb
Barite | Level 11

Is it possible to remove the creation time/date?

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1294 views
  • 0 likes
  • 2 in conversation