You can use PROC SGPLOT, BY variables, and a SG annotation data set together to put separate annotations into each BY group. However, you need two more steps to make it happen. This post shows all of the steps necessary to put different annotations into each graph when you have a BY variable.
Tips and Tricks
The PharmaSUG 2018 conference was held two weeks ago, with great enthusiasm and a record attendance. The highlight for me was the large spread on visual presentation of data, from papers to poster presentations. I will provide a more detailed report on all the exciting graphical presentations. One topic of
A while back a user requested to create a 3D WaterFall chart as presented by E Castanon Alvarez et. al. in "3D waterfall plots: a better graphical representation of tumor response in oncology" Annals of Oncology, Volume 28, Issue 3, 1 March 2017, Pages 454–456. I posted a blog article titled
The LOESS statement in PROC SGPLOT finds a fit function while making no assumptions about the parametric form of the regression function.
This article is motivated by a recent question on the SAS Communities board. This user wants to create a series or spline plot where the attributes of the line (color, thickness) can be changed based on another variable. In this case it may be a binary variable with "0" and
You can use penalized B-splines display a smooth curve through a set of data. The PBSPLINE statement fits spline models, displays the fit function(s), and optionally displays the data values.
A common request on the communities page is to place data labels on horizontal bar charts. Often users want to display stacked horizontal bar charts, with the values displayed for each segment and the overall value of the bar itself as shown in the example below. In this example, the
The REG statement fits linear regression models, displays the fit functions, and optionally displays the data values. You can fit a line or a polynomial curve. You can fit a single function or when you have a group variable, fit multiple functions.
Survival plots are automatically created by the LIFETEST procedure. These graphs are most often customized to fit the needs of SAS users. One way to create the customized survival plot is to save the generated data from the LIFETEST procedure, and then use the SGPLOT procedure to create your custom
A dual response axis chart is useful when the data type for the multiple measures are not compatible. For example, when overlaying measures like "This Year" sales with "Last Year" sales, the format and magnitudes of the two measures (or values for two groups) may be compatible, and it is