You can use a range attribute map to control the mapping of values in a continuous variable to colors. This post shows you how to use PROC SGPLOT to display multiple plots in the same graph and use range attribute maps.
Tag: SGPLOT
A vector plot draws a line from one point in a graph to another point. In this post, I will show you how to create short vectors instead of vectors that emanate from the origin. I also show how to modify the positions of the vector labels.
Did you know that you can make a graph extend across multiple pages? Making a multipage graph poses no problem for ODS Graphics---you simply use a BY variable to create page breaks. Most of the work involves deciding where to break pages and properly labeling continuations.
Recently, while browsing health care data, I came across the graph shown below. The graph includes the healthy life expectancy at birth by countries in the EU, along with the associated per capita expenditure. The graph also shows estimate of potential gain in life expectancy by increasing expenditure efficiency. The
For those of you who don't have SAS/Graph's Proc GMap, I recently showed how to 'fake' a variety of maps using Proc SGplot polygons. So far I've written blogs on creating: pretty maps, gradient shaded choropleth maps, and maps with markers at zip codes. And now (by special request from
This post shows you how to make a bar chart and an X-axis table; ensure consistency in the order of the legend, bar subgroups, and axis table rows; coordinate the colors for each of those components; and drive all the color choices from an attribute map.
Users frequently ask how to plot their data as markers on a map. There are several ways to do this using SAS software. If you're a Visual Analytics user, you can do it using a point-and-click interface. But if you're a coder, you might need a little help... In this
If you're a fan of SAS' ODS Graphics, you probably know that it does pretty much everything except geographical maps. But it's flexible enough that you can "fake it 'till you make it"! This example describes how to fake a geographical (choropleth) heat map using Proc SGplot polygons. In my
If you give an artist some tools, they can create a pretty picture. Sure, they might have a preferred tool - but they can probably do a pretty decent job no matter what you give them (paint, colored pencils, watercolor, charcoal, etc). And creating pretty graphs in SAS is no
Today's post illustrates the REG, PBSPLINE, LOESS, SERIES, and SPLINE statements in PROC SGPLOT. The GROUP= and BREAK options in the SERIES statement are also discussed.
PROC SGPLOT writes a graph template and uses it to create a graph. You can edit the template and then create a modified graph.
I review some fundamental principles of creating axis tables along with graphs that have TYPE=LINEAR or TYPE=DISCRETE axes.
Axis tables enable you to combine tabular and graphical information into a single display. I love axis tables. My involvement with axis tables dates back over 30 years to their ancient predecessor, the table that contains an ASCII bar chart. In the mid 1980s, I created a table in PROC
Displaying nicely rendered axis values reduces clutter and makes the graph more readable. With SAS 9.4, we added the ability for splitting x-axis tick values on white space to create a nice and readable x-axis as shown in the graph on the right. It is always a challenge to fit
This is the 2nd installment of the "Getting Started" series, and the audience is the user who is new to the SG Procedures. It is quite possible that an experienced users may also find some useful nuggets here. One of the most popular and useful graph types is the Bar
SAS Community member @tc (a.k.a. Ted Conway) has found a new toy: ODS Graphics. Using PROC SGPLOT and GTL (Graph Template Language), along with some creative data prep steps, Ted has created several fun examples that show off what you can do with a bit of creativity, some math knowledge,
A Spider Plot is another way of presenting the Change from Baseline for tumors for each subject in a study by week. The plot can be classified by response and stage. Another way of displaying Tumor Response data was discussed earlier in the article on Swimmer Plot. This article is prompted
In this post, I will show you how to control the order of the entries in a legend and explicitly control the correspondence between groups and style elements in PROC SGPLOT. In many cases, the colors that are used to differentiate groups do not matter--the graph simply needs to display
There was a recent comment on the original 'Unbox Your Box Plots', where a user wants to see the original data for the box, but only label the outliers. As noted in the comment, labeling all the scatter markers and turning on the outlier display is not ideal. But there
I know what you're thinking: two "Boaty McBoatface" articles within two weeks? And we're past April Fool's Day? But since I posted my original analysis about the "Name our ship" phenomenon that's happening in the UK right now, a new contender has appeared: Poppy-Mai. The cause of Poppy-Mai, a critically
I have written a new book: Basic ODS Graphics Examples. It is available as a free PDF file on the web. It is in color, and all of the SAS code is available by double clicking a link at the beginning of each example. This new book complements my other
In a voting contest, is it possible for a huge population to get behind a ridiculous candidate with such force that no other contestant can possibly catch up? The answer is: Yes. Just ask the folks at NERC, the environmental research organization in the UK. They are commissioning a new
Infographics are all the rage today. Open any magazine or newspaper and we see data and numbers everywhere. Often, such information is displayed by adding some graphical information to add context to the data. A couple of good examples are Communicating numeric information, and Facts about Hot Dogs. Riley Benson, our UX
Beim adventlichen Weihnachtsstern Basteln am vierten Advent hob ich schon warnend den Finger und hielt Sie gemäß des Mottos „Save a Tree“ dazu an, beim Ausdruck der Schnittmuster mit dem Papier ressourcenschonend umzugehen. Vor dem Hintergrund der in Paris erfolgreich verhandelten Begrenzungen des zukünftigen CO2-Ausstoßes, muss man sich ja auch noch
In the previous article I described a way to create a box plot with multiple connect lines using SAS 9.40M1 or later release . I created the graph using SGPLOT with VBOX and overlaid SERIES statements. Such an overlay of a basic plot on the VBOX statement is supported starting
All axis customization features are always welcome. Especially since SGPLOT statements can often be used to create non standard graphs, having the ability to customize the axes is important. This article presents ways in which you can customize the discrete axes. By default, the x axis will try to display the
The SGPLOT procedure provides great tools to create all kinds of graphs for all domains from business to clinical. However, every so often, we need to create visuals that are not exactly graphs, but more like flow or network diagrams, or something entirely unique. Some users may have tools to
A few weeks back I saw a couple of posts on the Communities page from users wanting to find ways to compute the area of an general polygon and also the center of the area. I felt such features likely existed somewhere in the SAS/GRAPH set of procedures, so I asked our resident
When we first released GTL and SG Procedures back with SAS 9.2, Box Plots and Bar Charts would always treat the category axis as discrete. We realized soon enough that we need to support box plots on scaled interval axes for many clinical applications, and this was added in SAS
SAS 9.4 Maintenance release 3 was released on July 14. The ODS Graphics procedures include many important, useful and cool features in this release, some that have been requested by you for a while. In the next few articles, I will cover some of these features. Last time I covered