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

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…

Contents