From the course: SAS Programming for R Users, Part 2
Unlock this course with a free trial
Join today to access over 22,600 courses taught by industry experts.
Demo: Enhancing the plot - SAS Tutorial
From the course: SAS Programming for R Users, Part 2
Demo: Enhancing the plot
- [Instructor] In this demonstration, I'll show you how to enhance the plot with lots of different statements and options right in the sgplot procedure. First, I'm going to create a data set called sales. Again, I'll set my seed, and then I'm going to go from month=1 to 12 and create two different variables. First, revenue, which is normally distributed with a mean of 10,000 and a standard deviation of 1,000, and then revenue two, which is, again, normally distributed with a mean of 13,000 and a standard deviation of 500. Here, I'm specifying two different revenues for perhaps two different companies. Let's run this data so I have access to use it. In part B, I'm going to use the sgplot procedure to create a series plot, so I'll use two different series statements for the different revenues in my sales data set. X is going to be equal to month, Y is going to be equal to revenue, and as an option, I'm going to specify my legend label as Company A. Because I'm using the series…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
The DO loop6m 18s
-
(Locked)
Random number generation3m 40s
-
(Locked)
Demo: The DO loop and random number generation5m 27s
-
(Locked)
Plotting with the SGPLOT procedure6m 55s
-
(Locked)
Demo: Creating standard R plots7m 12s
-
(Locked)
Enhancing the plot1m 47s
-
(Locked)
Demo: Enhancing the plot5m 43s
-
(Locked)
Multi-cell plotting procedures and statements6m 5s
-
(Locked)
Demo: Multi-cell plotting4m 33s
-
-