When we plot graphics using SAS PROC TEMPLATE or PROC GPLOT or other procedures, we need to decide the x-axis and y-axis tick-value list. However when we plot hundreds or thousands line, bar graphics using SAS, how could we automatically calculate the y-axis tick-values is a huge challenge. My sub-engine can automatically calculate and provide nice y-axis tick-values for sets of minimum and maximum values. Once you decide the minimum and maximum values among a set of numbers, you can use this sub-engine to automatically calculate your x-axis and y-axis tick-values including yaxisopts tickvaluelist, yaxisopts tickvalueformat, barchart statement barlabelformat, referenceline curvelabel, xaxisopts tickdisplaylist and xaxisopts tickvaluelist, and more when you use PROC TEMPLATE, PROC GPLOT or other procedures.
Here are the features:
1, the increment values are 1, 1.25, 2, 2.5, 5, 10 … and their … 0.0001, 0.001, 0.01, 1, 10, 100, 1000 … times; it is easy to count with mind only.
2, the number of grids are between 6 and 15, we can make this number smaller if need;
3, the gaps between maximum value and the upper-band are no more than 2 or 3 times of increment values;
4, the gaps between minimum value and the low-band are no more than 2 or 3 times of increment values except that the low_band is 0;
5, the y-axis tick-values are always including 0 value;
6, the biggest and smallest values are always covered by the up and low bands;
7, This calculator will automatically calculate and define the parameters of yaxisopts origin, yaxisopts viewmin, yaxisopts tickvaluelist, yaxisopts tickvalueformat, barchart statement barlabelformat, referenceline curvelabel, xaxisopts tickdisplaylist and xaxisopts tickvaluelist.
In the calculator engine, we call them as
%GLOBAL ytickvaluelist_&page._&postn
ytickdisplaylist_&page._&postn (you can add it into the engine by yourself)
xtickvaluelist_&page._&postn
xtickdisplaylist_&page._&postn
curvelabel_&page._&postn
tickvalueformat_&page._&postn
origin_&page._&postn
xtickvaluelist_&page._&postn
xtickdisplaylist_&page._&postn ;
8, the tickvalueformat_&page._&postn will make all values in the image with same format, please see the first graphics.
Auto-calculator of the graphic yaxis tickvalues for SAS GRAPHICS II.pdf
(394.27 KB)
Auto-calculator of the graphic yaxis tickvalues for GRAPHICS II.pptx
(1.73 MB)
Auto-calculator of the graphic yaxis tickvalues for GRAPHICS II.docx
(410.71 KB)



雷达卡




京公网安备 11010802022788号







