Posts Tagged ‘ Statistical Graphics ’

How to overlay custom curves with PROC SGPLOT

April 22, 2013
By

I recently showed someone a trick to create a graph, and he was extremely pleased to learn it. The trick is well known to many SAS users, but I hope that this article will introduce it to even more SAS users. At issue is how to use the SGPLOT procedure
Read more »

Tags: , ,
Posted in SAS | Comments Off on How to overlay custom curves with PROC SGPLOT

Changing the ODS style might change color ramp (and what to do about it)

April 1, 2013
By

Did you know that your ODS style might result in changing the color ramp for contour plots and heat maps? For example, the default style in SAS 9.3 is HTMLBlue. Let's create a contour plot in the HTML destination by running an example adapted from the documentation for the RSREG
Read more »

Tags: ,
Posted in SAS | Comments Off on Changing the ODS style might change color ramp (and what to do about it)

How to plot a discontinuous function

March 25, 2013
By

It is easy to use the SGPLOT procedure in SAS to plot the graph of a well-behaved continuous function: just create a data set of the (x,y) values on some domain and use the SERIES statement to connect the points. However, to plot the graph of a discontinuous function correctly
Read more »

Tags: ,
Posted in SAS | Comments Off on How to plot a discontinuous function

How use PROC SGPLOT to display the slope and intercept of a regression line

February 27, 2013
By

A SAS user asked an interesting question on the SAS/GRAPH and ODS Graphics Support Forum. The question is: Does PROC SGPLOT support a way to display the slope of the regression line that is computed by the REG statement? Recall that the REG statement in PROC SGPLOT fits and displays
Read more »

Tags: , ,
Posted in SAS | Comments Off on How use PROC SGPLOT to display the slope and intercept of a regression line

Create a bar chart with an "Others" category

January 14, 2013
By

When a categorical variable has dozens or hundreds of categories, it is often impractical and undesirable to create a bar chart that shows the counts for all categories. Two alternatives are popular: Display only the Top 10 or Top 20 categories. As I showed last week, to do this in
Read more »

Tags: , ,
Posted in SAS | Comments Off on Create a bar chart with an "Others" category

Create a bar chart with only a few categories

January 9, 2013
By

Sometimes a categorical variable has many levels, but you are only interested in displaying the levels that occur most frequently. For example, if you are interested in the number of times that a song was purchased on iTunes during the past week, you probably don't want a bar chart with
Read more »

Tags: , ,
Posted in SAS | Comments Off on Create a bar chart with only a few categories

Show percentages for bar charts with PROC SGPLOT

December 3, 2012
By

It seemed like an easy task. A SAS user asked me how to use the SGPLOT procedure to create a bar chart where the vertical axis shows percentages instead of counts. I assumed that there was some simple option that would change the scale of the vertical axis from counts
Read more »

Tags: ,
Posted in SAS | Comments Off on Show percentages for bar charts with PROC SGPLOT

Visualizing congressional representation by state and time

September 19, 2012
By

With the US presidential election looming, all eyes are on the Electoral College. In the presidential election, each state gets as many votes in the Electoral College as it has representatives in both congressional houses. (The District of Columbia also gets three electors.) Because every state has two senators, it
Read more »

Tags: , ,
Posted in SAS | Comments Off on Visualizing congressional representation by state and time

Welcome!

SAS-X.com offers news and tutorials about the various SAS® software packages, contributed by bloggers. You are welcome to subscribe to e-mail updates, or add your SAS-blog to the site.

Sponsors







Dear readers, proc-x is looking for sponsors who would be willing to support the site in exchange for banner ads in the right sidebar of the site. If you are interested, please e-mail me at: tal.galili@gmail.com
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.