A couple of weeks back I described q way to create a Schedule Chart using the SGPLOT procedure. In that case, I used the HIGHLOW plot to draw bar segments, both for a single and grouped case. A natural extension is to create one with links between each segment. So,
Search Results: sgplot (958)
If you've ever tried to use PROC FREQ to create a frequency table of two character variables, you know that by default the categories for each variable are displayed in alphabetical order. A different order is sometimes more useful. For example, consider the following two-way table for the smoking status
Last week Bruno asked about creating a Schedule Chart using SG Procedures. To me, such projects are very interesting and challenging...How much mileage can we get out of the current set of SGPLOT procedure features to create a visual that was not part of the original requirements? The clear choice for
On Kaiser Fung's Junk Charts blog, he showed a bar chart that was "published by Teach for America, touting its diversity." Kaiser objected to the chart because the bar lengths did not accurately depict the proportions of the Teach for America corps members. The chart bothers me for another reason:
In my last blog post I described how to implement a "runs test" in the SAS/IML language. The runs test determines whether a sequence of two values (for example, heads and tails) is likely to have been generated by random chance. This article describes two applications of the runs test.
This is the last post in my recent series of articles on computing contours in SAS. Last month a SAS customer asked how to compute the contours of the bivariate normal cumulative distribution function (CDF). Answering that question in a single blog post would have resulted in a long article,
A couple of weeks back we had a question on how to make a bar chart with stacked and clustered groups. User also wanted to display the value for each stacked segment below the bars. The article Bar Charts with Stacked and Cluster Groups shows how to create such a
Like many other computer packages, SAS can produce a contour plot that shows the level sets of a function of two variables. For example, I've previously written blogs that use contour plots to visualize the bivariate normal density function and to visualize the cumulative normal distribution function. However, sometimes you
Recently, SAS released SAS Solutions OnDemand for academics. An academic user who is signed up for this can use the SAS Web Editor application to do all their data analysis over the web using a hosted server at SAS. This frees up the user from having to install the software on their own computers,
This week I read an interesting blog post that led to a discussion about specifying the frequencies of observations in a regression model. In SAS software, many of the analysis procedures contain a FREQ statement for specifying frequencies and a WEIGHT statement for specifying weights in a weighted regression. Theis
In a previous post, I showed how to solve differential equations in SAS by using the ODE subroutine in the SAS/IML language, which solves initial value problems. This article describes how to draw phase portraits for two classic differential equations: the equations of motion for the simple harmonic oscillator and
Differential equations arise in the modeling of many physical processes, including mechanical and chemical systems. You can solve systems of first-order ordinary differential equations (ODEs) by using the ODE subroutine in the SAS/IML language, which solves initial value problems. This article uses the equations of motion for the classic simple
Creating bar charts with group classification is very easy using the SG procedures. When using a group variable, the group values for each category are stacked by default. Using the sashelp.prdsale data set and default STAT of SUM, here is the graph and the code. SGPLOT code: proc sgplot data=sashelp.prdsale;
Recently my boss came across a graph where a time series plot was modified to include a "thickness" response. We wondered if this would be a good addition to the GTL / SG Series plot statement. What would the result look like, and what are the pros and cons? So, I took up
A common visualization is to compare characteristics of two groups. This article emphasizes two tips that will help make the comparison clear. First, consider graphing the differences between the groups. Second, in any plot that has a categorical axis, sort the categories by a meaningful quantity. This article is motivated
The graphs produced by the SG procedures (and GTL) have a default look and feel designed for the common use cases. However, everyone has a preference for some special features that make the graphs unique. Fortunately, extensive customizations can be made to graphs produced by these tools using statement and
As promised, here is a better combined AE-CM graph, using some of the UI improvements suggested by our UI expert, Riley. His suggestions helped to reduce the clutter in the graph, while still keeping all the features preferred by our users. Click on the graphs for a higher resolution image.
How old is your version of SAS software? The graph on the left shows the release dates for various releases of SAS software, beginning with SAS 8.0. The graph is based on a graph on Jiangtang Hu's blog that shows the major SAS releases. As this graph demonstrates, SAS software
In a previous article I discussed how to bin univariate observations by using the BIN function, which was added to the SAS/IML language in SAS/IML 9.3. You can generalize that example and bin bivariate or multivariate data. Over two years ago I wrote a blog post on 2D binning in
Last week, I presented some highlights of the new features for SG Procedures and GTL in SAS 9.4. Now, let us dig in a bit deeper. For a plot without a GROUP role, setting an attributes was always easy with SG procedures. All you need to do to set bar color
SAS 9.4 releases today with a ton of new features. As eloquently stated by Craig Rubendall, the driving themes are "Enable. Simplify. Innovate". The same sentiment applies to the ODS Graphics, with a ton of new features for the SG Procedures, GTL and ODS Graphics Designer. In the next few articles,
Four authors. Four papers. One set of data. The month of August and the 2014 Call for Content are just around the corner, and this seems like a good time to share a little inspiration and innovation. The Foundations and Fundamentals paper section at SAS Global Forum 2013 featured a four-part
Recently a user chimed in on the SAS Communities page, requesting a way to add some observation level annotation to a box plot. Wendy was delighted to see a graph created by the UNIVARIATE procedure called "Schematic Plot". In this graph, the box plot of the analysis variable is shown with
A Bar Line graph is commonly used in many domains. The SGPLOT procedure makes it easy to create bar line graphs where the user can customize it in many different ways. This post is prompted by a recent question on the communities page on creating such a graph, with one bar and
If you write a blog, you deal with spam comments. That's just part of the deal. Spammers are forever inventing new and creative methods for "tricking" you into accepting their spam comments. These comments have nothing to do with your blog topic but do contain trackback links to their own
The SAS Global Forum conference last week was awesome. From the perspective of graphics, there were more papers from uses on graphics and ODS graphics then in recent times. I will post a summary shortly. One of the interesting papers was "#113-2013 - Creating Clark Error Grid using SAS/GRAPH and Annotate..."
I've previously described how to overlay two or more density curves on a single plot. I've also written about how to use PROC SGPLOT to overlay custom curves on a graph. This article describes how to overlay a density curve on a histogram. For common distributions, you can overlay a
The 2013 SAS Global Forum is around the corner in San Francisco and the anticipation is building. Early indications are that attendee registration is up from last year, and we are looking forward to a great conference starting Sunday, April 28. It is great to see the large and diverse offering
I often see variations of the following question posted on statistical discussion forums: I want to bin the X variable into a small number of values. For each bin, I want to draw the quartiles of the Y variable for that bin. Then I want to connect the corresponding quartile
I was recently asked how to compute the difference between two density estimates in SAS. The person who asked the question sent me a link to a paper from The Review of Economics and Statistics that contains several examples of this technique (for example, see Figure 3 on p. 16