## Tag: SGPLOT

Data Visualization
0
Dual Response Axis Graphs

Often we need graphs that display two or more responses by the same category values.  In many cases it is useful to plot both responses on the same response (Y) axis.  This can be helpful to understand the data and compare the magnitudes side by side.  This works when the scales

Data Visualization
0
Graph Table

A common scenario is where we have a table of multiple measures over time. Here we have a simple example of Frequency and Response by Day.  The Response is a linear function of the Frequency, as shown in the table on the left below. The  shape of the data is

Data Visualization
0
Axis Break Appearance Macro

Often, we have data where most of the observations are clustered within a narrow range, with a few outliers positioned far away.  When all the data is plotted, the axis is scaled to accommodate all the data, thus skewing the scale.  Techniques to handle such data have been addressed earlier

Data Visualization
0
Axis Thresholds

Have you ever wondered why sometimes a SGPLOT or GTL graph has markers drawn beyond the extreme tick and value on an axis and sometimes not?  And, if you prefer your graphs to always have tick values on the axis that cover the whole range of data, how can you

Data Visualization
0
Bar with Statistics

One of the key benefits of using a horizontal bar chart is the ability to display statistics for each bar.  This is a popular feature for the HBAR statement with the SAS/GRAPH GCHART procedure.  So, let us review the options available to us to create such graphs using SGPLOT. The

Data Visualization
0
Likert Graphs

Just this morning I received a request for a brief survey from Apple on my feedback about the new iPhone6+.  Yes, I finally got one, dead last in the family.  The survey followed the usual format, with a number of questions on what I like or dislike about it, with

Data Visualization
0
CandleStick Chart

A HighLow plot is very popular in the financial industry, often used to track the periodic movement of a stock or some instrument or commodity.  The CandleStick Chart is one specific type of high low plot, purportedly originating in Japan for tracking of financial instruments in the rice trade. Creating a

Data Visualization
0
Splines

Many users of SGPLOT and GTL know how to mix and match various plot statements to create graphs, sometimes in ways not originally intended.  You are also aware that you can go a step beyond, and use these systems to create completely non-standard graphs such as the Spiral Plot, the Polar

Data Visualization
0
PharmaSUG-China 2014

The Third PharmaSUG-China conference was held in Beijing last week, and I had the pleasure to attend this excellent conference along with a record number of attendees. On Thursday, I presented two 1/2 day seminars on ODS Graphics.  One titled "Advanced Topics in GTL" and another titled "Complex Clinical Graphs

Data Visualization
0
Binary Response Graph

Often we need to plot the response values for binary cases of a classifier.  The graph below is created to simulate one seen at http://www.people.vcu.edu/ web site of the shock index for subjects with or without a pulmonary embolism.  In this case, the data is simulated for illustration purposes only. There

Data Visualization
0
New Graphics Features in SAS 9.4M2 - Part 1

SAS 9.4 maintenance release M2 was released early in August.  This release contains some exciting new features in GTL and SG Procedures.  In this article, I will describe some of the new options added to the existing plot statements.  Note, I will use the SG examples here, but these are

Data Visualization
0
More on Spaghetti Plots

In her article Creating Spaghetti Plots Just got Easy, Lelia McConnell has provided us a glimpse into some new useful features in the SAS 9.4M2 release.  The term Spaghetti plots generally refers to cases where time series plots have to be  identified by multiple group classifications.  The support for the

Data Visualization
0
Creating Spaghetti Plots Just Got Easy

This article is by guest contributor Lelia McConnell, SAS Tech Support. Creating Spaghetti Plots Just Got Easy Sample 38076: “Response by patient and treatment group” illustrates how to generate a spaghetti plot using the SGPLOT procedure.  Sample 40255: “Plot of study results by treatment group” illustrates how to generate a

Data Visualization
0
Epidemic Curve Graph

A few weeks back I wrote an article on Grouped Timeline for creating a stacked timeline for onset of different virus.  The idea in that article was to display a stacked needle on a time axis using a HighLow plot. Such graphs are also referred to as EPI or Epidemic Curve

Data Visualization
0
Overlay Bar Charts

A couple of days back, Rick Wicklin forwarded me a link to an article on the BadHessian Blog on creating a Bar Chart using six different freeware packages in R, Python and Julia.   The target bar chart was one produced by the Jetpack stat module with WordPress.  The graph is shown below. The unique feature of

Data Visualization
0
Spirals

Spirals are cool.  And useful.  We use them every day without thinking about it.  Every time the road turns from a straight line to a curve, we go through a transition spiral.  Spirals allow us to change curvature in a steady increasing or decreasing fashion.   Without a spiral, this

Data Visualization
0
Lab Values Panel

It was almost two weeks ago that I got started making a display for lab tests for a subject, based on a graph I saw on the web for an article on this blog.  This graph is a part of a larger panel display of the lab values for a

Data Visualization
0
The HIGHLOW Plot

SG Procedures and GTL provide you with a large set of plot statements, such as BarChart, ScatterPlot, BoxPlot and more.  You can use them for the intended purpose, and all is well and good.  However, the real fun starts when you leverage a plot to do something that was not

0
Blog spam: ain't nobody got time for that

Here at SAS, we've come a long way with how we deal with blog spam on blogs.sas.com. Last year at this time, I was sifting through dozens of spam messages per day in order to salvage the one or two genuine comments that originate from real readers. I was just

Data Visualization
0
Animation using SGPLOT

Often we want to visualize the relationship between variables over time.  The understanding of such data can be improved by viewing the animated graph over time.  With SAS 9.4, you can create animated graphs using the new animation options on the OPTIONS statement and the PRINTER destination. A popular example an

Data Visualization
0
Report from PharmaSUG 2013

The PharmaSUG 2013 conference in Chicago this week was awesome.  From the perspective of graphics, there was great interest in using SG Procedures, Designer and GTL for building clinical graphs.  It was nice to see many papers by users on how they are using these tools for creating graphs on a daily

Data Visualization
0
Attribute Maps - 1

You created a graph of Response over Time by Severity where Severity has three levels, "Severe", "Moderate' and "Mild".  How do you ensure that "Severe" is always red in your graph, regardless of the data order? Normally, when creating any graph with a GROUP role, the distinct group values are assigned the style

Data Visualization
0
Custom Box Plots

A frequent question we get from users is how to create a box plot with custom whiskers lengths.  Some want to plot the 10th and 90th percentile, while other want the 5th and 95th percentiles.  The VBOX statement in the SGPLOT  procedure does not provide for custom whiskers.  Also, unlike GTL,

Data Visualization
0
Controlling Point Labels on Series Plot

SG procedures and GTL use a collision avoidance algorithm to position data labels for a scatter or series plot.  This is enabled by default.  The label is preferably placed at the top right corner of the marker.  The label is moved to one of the eight locations around the marker to

Data Visualization
0
Parametric Bar Charts

A parametric bar chart in SG Procedure and GTL parlance is a simplified version of the regular bar chart, where the data is assumed to be summarized prior to its usage inside the SG procedures or GTL.  So, multiple occurrences of the same category and / or group combination is

0
Mathematical squiggles in SAS

John D. Cook shared a picture of "pretty squiggles" on his blog, as well as a prose description of the mathematics behind it. I'm more of a programmer than a mathematician, but I've attempted to transcribe his description into a SAS program. I used DATA step to generate the point

Data Visualization
0
PharmaSUG 2012 update

PharmaSUG 2012 conference drew to a close today, concluding two and a half days packed with papers, presentations, posters, hands-on demos and super demos by SAS staff.  While the weather outside was a bit chilly from time to time, the conference what hopping with many user papers on how to

Data Visualization
0
Graphs with log axis

Recently I posted an article on this blog on how to create bar charts with log response axes in response to a question by a user.  This generated some feedback suggesting that bar charts should not be used with log response axes or with a baseline of anything other than

Data Visualization
0
Simpler is better

A recent article in the SAS and R blog was about current winter temperatures in Albany, NY.  The temperature data for the recent winter (Dec 2011 - Mar 2012) was plotted on a polar graph. Robert Allison posted an article on displaying the same data as a Polar Graph using SAS/GRAPH .  Here is his