SUPPORT / SAMPLES & SAS NOTES
 

Support

Sample 24932: Display the left and right axes with a single combined legend with PROC GPLOT

DetailsCodeResultsAboutRate It
This sample uses PLOT and PLOT2 statements with PROC GPLOT to create a graph with two vertical axes. A dummy variable with all missing values is added to the data set in order to produce a single combined legend.

To produce a single combined legend, the SYMBOL3 and SYMBOL4 statements in the sample code are identical. While the third entry in the legend actually represents the new dummy variable added to the data set, the use of a LEGEND statement makes it appear as though the third legend entry represents the variable plotted by the PLOT2 statement.


These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.