When a plot is classified by one or more variables, the different classes values are displayed in the graph either by position or by using different plot attributes such as color, marker shape or line pattern. For plots that display the visual by a filled area (bar, bin, band, bubble, etc), the classification could be represented by a fill color or an outline using line patterns (may not always very effective).
Often you have to submit figures or graphs with your presentation in PDF format to journals or agencies that require the graphs be rendered in black and white, or gray scale, but not in color. For such output, ODS Graphics provides built-in SAS Styles called JOURNAL, JOURNAL2 and JOURNAL3. JOURNAL2 is a pure black and white style that also specifies the fill patterns that are used for group classification.
For a while now, users have requested support of fill patterns for all plots that represent data using filled areas. While this may appear to be "old school", it is indispensable in some cases. Since SAS 9.3, the bar charts in GTL and SGPLOT have supported fill patterns. Now, with the release of SAS 9.40M5, all plots that display data using filled areas support fill patterns for group classification. Here are some examples.
Note: Full code for all examples is linked at the bottom of the page.
Note the visual effect of placing the bars with pattern fills side by side that makes them appear to "lean towards" the middle. This is merely a visual effect, and actually, the bars are quite straight and rectangular.
The fill types for each group value are derived from the Style Elements GraphData1 - GraphData12. Along with colors, markers and line patterns, these elements in the JOURNAL2 style also include the fill types. These are denoted with the names "L1", "R1", "X1" and so on. The display attribute for fill patterns is also enabled.
For the VBOX, the whiskers are displayed using different line patterns. In the absence of fill patterns, the line patterns and the mean marker shape denote the group classification. With fill patterns, I like to display the whisker using the solid line pattern. This can be done by setting the WHISKERATTRS option.
One thing I noticed with the bubble plot was the AUTOITEMSIZE for making the bubbles in the legend proportional to the text size did not seem to work. Something for us to follow-up on.
I reduced the number of class levels to two for clarity. Also, you can use the STYLEATTRS statement to set the fill patterns you want to use with the groups. Discrete attribute maps also support fill patterns.
Similar to a bar chart or a box plot.
Groups will use different fill patterns, as will multiple overlays.
The polygon plot is very versatile, and allows you to render any polygonal shape that you can define as a polygon with (x, y) vertex data. Polygons can have text labels and can be used to render maps from map data set.
When using skins or fill patterns, the visual element in the legend is made a bit bigger to allow the display of the pattern. This can be customized by using various legend options.
While I did not cover every version of every plot, all vertical and horizontal versions of these plot statements will support fill patterns.
SAS 9.40M5 SGPLOT Code: Fill_Patterns