Data visualization with SAS programming

Default marker attributes for grouped data

Accepted Solution Solved
Reply
Contributor
Posts: 28
Accepted Solution

Default marker attributes for grouped data

I am creating a scatter plot using GTL (code excerpt below) using the variable entry as the grouping variable.

Where can I find a list that tells me which marker symbol corresponds with each value of the the variable entry?

 

I tried displaying the legend but that doesn't work because there are more than 20 unique values in the vraibale entry so it won't display the entire legend in the plot.

 

PROC TEMPLATE; DEFINE STATGRAPH layoutlattice; BEGINGRAPH / designheight = 6.6in DESIGNWIDTH=3.3in;

layout lattice / rowweights=(.46 .54) rowgutter = 0

columns = 1 rows = 2 rowdatarange = data columndatarange = union;

LAYOUT OVERLAY / WIDTH = 100pct HEIGHT = 80pct

YAXISOPTS=(labelattrs = (size = 11pt family= "Times New Roman")

tickvalueattrs = (family = "Times New Roman" size = 9pt)

GRIDDISPLAY = OFF LABEL = "Reference Hybrid")

XAXISOPTS = (DISPLAY = NONE);

SCATTERPLOT X=isoline_mean_ref Y=ref_mean / markerattrs = (color = black) GROUP = entry;

 

LINEPARM X=0 Y=0 SLOPE=1 / LINEATTRS = (COLOR = gray);


Accepted Solutions
Solution
‎10-28-2016 12:33 AM
SAS Super FREQ
Posts: 1,081

Re: Default marker attributes for grouped data

Normally, a style has 7 different marker symbols.  These get rotated with colors to provide up to 84 combinations.  You can find these if you look up the GraphData1-12 style elements in the appropriate Style template file in SASHELP.Tmplmst->Styles->stylename.  Normally these are circle, plus, x, triangle, square, asterix and diamond.

 

If the style you are using is HTMLBlue, then all 12 colors are cycled for each symbol, before the next symbol is used.  so, you will likely see only 2 symbols for 20 groups.  You can set ATTRPRIORITY=none in the ODS GRAPHICS statement to get cycling of both color and marker for each group.

 

You can also increase the space for the legend by setting MAXLEGENDAREA=40 or higher to provide more space for legends on the ODS GRAPHICS statement:

http://support.sas.com/documentation/cdl/en/odsug/67921/HTML/default/viewer.htm#p0kroq43yu0lspn16hk1...

 

View solution in original post


All Replies
Solution
‎10-28-2016 12:33 AM
SAS Super FREQ
Posts: 1,081

Re: Default marker attributes for grouped data

Normally, a style has 7 different marker symbols.  These get rotated with colors to provide up to 84 combinations.  You can find these if you look up the GraphData1-12 style elements in the appropriate Style template file in SASHELP.Tmplmst->Styles->stylename.  Normally these are circle, plus, x, triangle, square, asterix and diamond.

 

If the style you are using is HTMLBlue, then all 12 colors are cycled for each symbol, before the next symbol is used.  so, you will likely see only 2 symbols for 20 groups.  You can set ATTRPRIORITY=none in the ODS GRAPHICS statement to get cycling of both color and marker for each group.

 

You can also increase the space for the legend by setting MAXLEGENDAREA=40 or higher to provide more space for legends on the ODS GRAPHICS statement:

http://support.sas.com/documentation/cdl/en/odsug/67921/HTML/default/viewer.htm#p0kroq43yu0lspn16hk1...

 

Contributor
Posts: 28

Re: Default marker attributes for grouped data

Thank you so much Sanjay; that is the information that I needed!

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 252 views
  • 0 likes
  • 2 in conversation