****************************************************************************************************
****************************************************************************************************
* PROGRAM: figure_axes.sas
* Created (mm/dd/yyyy): 09/08/2021
*--------------------------------------------------------------------------------------------------
* PURPOSE: The macro computes X and Y axis tick marks
* - figuresub: figuresub from figurefile
* - where: where clause to restrict figure data
* - xtickmarks: macro variable name for x tick mark list
* - xvar = variable with xaxis metric
* - ytickmarks: macro variable name for y tick mark list
* - yvar= variable with yaxis metric
*--------------------------------------------------------------------------------------------------
* Sentinel Coordinating Center
* info@sentinelsystem.org
***************************************************************************************************;
%macro figure_axes(data=, figure=, figuresub=, where=, xtickmarks=, xvar=, ytickmarks=, yvar=);
%put =====> MACRO CALLED: figure_axes;
/*select min and max value from input dataset for x axis*/
%if %str(&xtickmarks) ne %str() %then %do;
select min(&xvar.), max(&xvar.) into :datamin, :datamax
from &data(where=(&where.));
%if %str(&yvar.) ne %str() %then %do;
select max(&yvar.) into :datamax
from &data(where=(&where.));