In my previous post I described the new Polygon plot statement that is included with the SAS 9.4M1 release. So, a valid question is - what is my motivation for discussing the new features in SAS 9.4M1 when most users are at SAS 9.3 or SAS 9.2 versions? Here are a few reasons:
- Some of you will get the new release early and this information may be valuable to you.
- It is an indicator of ongoing work to enhance the graphics features in SAS.
- This will create a repository of examples you can access as you start using the new release.
In this article, I want to address a new feature added at your request - "Broken Axis". Here are two graphs showing the same data without and with broken axis.
SAS 9.4M1 GTL code:
proc template; define statgraph BrokenAxis; begingraph; entrytitle 'Bar Chart with Broken Y axis'; layout overlay / xaxisopts=(display=(ticks tickvalues)) yaxisopts=(display=(ticks tickvalues) griddisplay=on linearopts=(includeranges=(0-30 195-220))); barchart category=x response=y / dataskin=gloss; endlayout; endgraph; end; run;
Note the new option INCLUDERANGES in the LINEAROPTS bundle where you can provide the ranges that are to be included on the axis. You can have more than two ranges. Only the data ranges provided in the ranges are retained. The range intervals are used to proportion the segments.
I had addressed other possible solutions to such use cases in a previous article on Broken Axes using techniques available in SAS 9.2 and SAS 9.3.
Broken axis can be specified for any one axis (X or Y or X2 or Y2) at a time. Linear and Time axis are supported. There are a few other restrictions. The intention is to put the basic feature out there and then see if further action is needed based on your feedback.
Full SAS 9.4M1 Program: BrokenAxis