BookmarkSubscribeRSS Feed
yabwon
Onyx | Level 15

Today we have March 8ht, so its International Women’s Day.

Bart

 

kwiat2024.gif

Code:

%macro kwiat(s,e,b,min=0,max=256,c=constant('pi'));
  %do i = &s. %to &e. %by &b.;
    data have;
      v=0.01;
      w=1;
      c=-1;

      do a=1,2,3,4,5;
        do y = -3*constant('pi') to -2 by 0.1;
          x1 = a*sin(y)/(10/y);
          output;
        end;
      end;
      x0 = .;

      do y = -4*constant('pi') to 0 by 0.1;
        x1 = sin(y)/10;
        output;
      end;
      x1 = .;

      w = &i.;
      do t = &min. to &max. by 0.5;
        c = &c. * sin(t);
        x3 = (v*t+c) * cos(w*t);
        y = (v*t+c) * sin(w*t);
        output;
      end;
      x3 = .;

      do t = 0 to 256 by 0.1;
        c = sin(t);
        w = 1;
        x2 =  - (v*t+c) * cos(w*t) + 0.3;
        w = 2;
        y = (v*t+c) * sin(w*t) - 6.5;
        output;
      end;
    run;

    /*ods graphics / height=1000px width=500px antialias=yes antialiasmax=100000;*/
    title "International Women’s Day 2024";
    proc sgplot data=have noborder noautolegend nowall PAD=0;
      series x=x1 y=y / LINEATTRS=(color=green thickness=8);
      series x=x1 y=y / LINEATTRS=(color=lightgreen thickness=5) transparency=0.5;

      series x=x2 y=y / LINEATTRS=(color=gold thickness=2) transparency=0.2;

      series x=x3 y=y / LINEATTRS=(color=white thickness=6) transparency=0.5;
      series x=x3 y=y / LINEATTRS=(color=pink thickness=4) transparency=0.25;
      series x=x3 y=y / LINEATTRS=(color=purple thickness=2);

      xaxis display=none min=-7 max=7;
      yaxis display=none min=-16 max=7;
    run;
  %end;
%mend kwiat;



ods _all_ close;                       
options papersize=('500 px','1000 px') 
        printerpath=gif 
        animation=start 
        nodate 
        nonumber 
        animloop=YES 
        noanimoverlay 
        animduration=.2;

ods printer file='R:/kwiat2024.gif';

ods graphics on / reset height=1000px width=500px antialias=yes antialiasmax=100000 imagefmt=GIF;

%kwiat(25,125,25,max=362)

options printerpath=gif animation=stop;
ods printer close;
_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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
  • 0 replies
  • 967 views
  • 7 likes
  • 1 in conversation