## How to plot as a beginner?

Solved
Occasional Contributor
Posts: 15

# How to plot as a beginner?

Hi ,

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

Accepted Solutions
Solution
‎08-31-2016 10:53 AM
Super User
Posts: 12,148

## 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.

All Replies
Solution
‎08-31-2016 10:53 AM
Super User
Posts: 12,148

## 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,910

## 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.