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
English
An earlier SGMAP blog used the BUBBLE statement to overlay point data on top of an Open Street Map. However, not all map features are points. Some are enclosed areas called polygons. Some map polygons share common borders such as states and counties. Others are separate, non-contiguous regions such as national parks
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
This post provides examples of DRAW statement syntax and links to the documentation.
DRAW statements provide to GTL what SG annotation provides to the SG procedures--a way to add text, shapes, lines, and arrows to graphs.
A few months ago, a user inquired about a chart that showed tumor response and treatment duration for each subject on 2 different planes of a 3D view. The data was really 2D, with one independent variable (the subject id) and two or more response values. I had provided an
PROC SGPLOT looks at the PROC statements, it looks at the data, and it writes a template that might depend on the data. If you want to understand how the graph is created, you need to look at the PROC SGPLOT code, the graph template and data objects that it constructs, and the final graph.
Usually, you use axis tables when there is a clear link between the rows of the axis table and the graph. I'll show how to use an axis table to create a table that is independent of the graph. This post also uses discrete attribute maps.