A beginner's tutorial on ... scatter plots

4

Scatter plots are probably the simplest kind of graph, and provide a great way to visually look for relationships between two variables.  But, do you know (right off the top of your head) the simple SAS/GRAPH code you would use to create them? ...

This tutorial leads you step-by-step through the process of creating the following six variations of scatter plots, using the simplest and most minimal code possible.  Below are examples of the graphs covered in this tutorial, and a link to the tutorial is at the bottom of the blog:

Basic Scatter Plot

Regression Line

Box Plot

Proportional Axes Plot

Bubble Plot

Filled Bubble Plot

And, as promised, here are links to the pdf files for the tutorial:

Introduction

Scatter Plots

I'd love to hear your feedback and suggestions, and whether this kind of tutorial would be useful to you for other types of plots as well (maybe bar charts, maps, etc?)  Feel free to leave a comment!

Click here to see my other tutorials on creating basic graphs!

Share

About Author

Robert Allison

The Graph Guy!

Robert has worked at SAS for over a quarter century, and his specialty is customizing graphs and maps - adding those little extra touches that help them answer your questions at a glance. His educational background is in Computer Science, and he holds a BS, MS, and PhD from NC State University.

Related Posts

4 Comments

  1. Fantastic blog post and tutorials. I agree with the quote in the Introduction chapter, “A motivated SAS/GRAPH programmer can create just about any graph.”

    I like the way you have stepped through the various scatter plots enhancing and describing the code. Love the power of annotate too!

    With regards to your question about thoughts for future tutorials, I think maps would be useful. I'm often referring people to Chris' blog post he wrote to sasusers in Australia,
    http://blogs.sas.com/content/sasdummy/2011/08/30/using-3rd-party-shape-files-to-build-map-charts-in-sas/

  2. Louise Hadden on

    Thanks, Robert, this is a great resource. I plan to use these examples to mentor junior SAS programmers with.

Back to Top