Data visualization with SAS programming

How to plot as a beginner?

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 15
Accepted Solution

How to plot as a beginner?

Hi ,

I need to plot height and weight from sashelp.class following the template.  Where do I start?

Sans.png


Accepted Solutions
Solution
‎08-31-2016 10:53 AM
Grand Advisor
Posts: 10,237

Re: How to plot as a beginner?

The basic plot can be accomplished with something similar to this:

proc sgplot data=yourdatasetname;

   scatter x=yourxvariable y=youryvariable;

run;

 

Depending on which other items displayed are absolutely necessary then you get to dig into the options available such as an added INSET statement to place additional text, title statement(s) for titles about the graph.

View solution in original post


All Replies
Solution
‎08-31-2016 10:53 AM
Grand Advisor
Posts: 10,237

Re: How to plot as a beginner?

The basic plot can be accomplished with something similar to this:

proc sgplot data=yourdatasetname;

   scatter x=yourxvariable y=youryvariable;

run;

 

Depending on which other items displayed are absolutely necessary then you get to dig into the options available such as an added INSET statement to place additional text, title statement(s) for titles about the graph.

Occasional Contributor
Posts: 15

Re: How to plot as a beginner?

what about those correlations (pearson and spearman), a hint on how to write them on the graph?
SAS Super FREQ
Posts: 3,416

Re: How to plot as a beginner?

here's a readable introduction to the SG procedures (including PROC SGPLOT) to get you started.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 225 views
  • 0 likes
  • 3 in conversation