BookmarkSubscribeRSS Feed
Filipvdr
Pyrite | Level 9

thanks a lot RW9. I have put my max and increment into some macro variables. works fine!

ods graphics / reset=all height=15cm width=19cm noborder;

proc template;

  define statgraph barchart;

    begingraph;

      entrytitle  "&wafersource_list";

      layout overlay /

  yaxisopts=(offsetmin=0

             label="Conc (E10A/cm2)"

  tickstyle=across

  linearopts= (tickvaluesequence=(start=0 end=&max increment=&interval)));

        barchart x=element y=Conc / name='a'  fillattrs=(color=cxFFFF66)  ;

        scatterplot x=element y=WL / name='b' markerattrs=(symbol=HomeDown);

  scatterplot x=element y=SL / name='c' markerattrs=(symbol=HomeDownFilled);

        discretelegend 'a' 'b' 'c';

   endlayout;

  endgraph;

  end;

run;

GraphGuy
Meteorite | Level 14

Here's one way to do it, using GChart & Annotate ...

 

data foo;
input country $ 1-10 value sl wl;
datalines;
France 12 10 30
Germany 35 20 50
Turkey 20 25 35
Greece 10 30 45
;
run;

 

data anno_lines; set foo;
length function color $8;
ysys='2'; hsys='3'; when='a';

 

function='move'; midpoint=country; xsys='2'; y=sl; output;
function='move'; x=-10; xsys='7'; output;
function='draw'; x=10*2; size=1.0; color='red'; output;

 

function='move'; midpoint=country; xsys='2'; y=wl; output;
function='move'; x=-10; xsys='7'; output;
function='draw'; x=10*2; size=1.0; color='green'; output;
run;

 

axis1 label=none value=(angle=90);
axis2 label=none order=(0 to 60 by 10);


pattern1 v=s c=cx63B8FF;


proc gchart data=foo anno=anno_lines;
vbar country / type=sum sumvar=value
maxis=axis1 raxis=axis2 noframe
width=4 space=3;
run;

 

foo.png

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 16 replies
  • 2200 views
  • 6 likes
  • 4 in conversation