Data visualization with SAS programming

Simple Graph Output

Reply
Frequent Contributor
Posts: 78

Simple Graph Output

Hey Experts,

I am sure you guys will know how to plot this graph..I have

VariableA
VariableB
VariableC

And I am wanting to plot VarA on X-axis and whereas this is the tricky bit...
Y-Axis will be VarB multiply by VarC.

Hope someone can help me out.

Cheers.
Yennie
SAS Super FREQ
Posts: 8,641

Re: Simple Graph Output

Hi:
You will need to create a new dataset -- either with a DATA step program or PROC SQL in which you create a new variable which is the result of the multiplication. Then you can plot the new variable and VariableA using either PROC GPLOT or PROC SGPLOT. There are lots of plotting examples in the documentation. For more information about how to create a new variable from an existing variables in an existing dataset, you should look at some of the examples in the documentation on Manipulating Data or using PROC SQL.

cynthia
SAS Employee
Posts: 963

Re: Simple Graph Output

Yennie - here's a short example ...

data tempdata; set sashelp.stocks;
VariableC=volume*close;
run;

proc gplot data=tempdata;
plot VariableC*date;
run;
Post a Question
Discussion Stats
  • 2 replies
  • 77 views
  • 0 likes
  • 3 in conversation