Help using Base SAS procedures

tickvalueformat in SAS sgplot & proc template

Reply
Contributor
Posts: 56

tickvalueformat in SAS sgplot & proc template

Hi All,
As option of "tickvalueformat" in sgplot is only associated with SAS phase2, I cannot use that option in my sgplot.

What I wanna do is only to change the ticks on x-axis to bold.

As suggested, proc template can be used to change the style of the plot. However I am absolutely new to template language.

And using some codes found online to define my own style will overwrite the original plot: say "ods listing style = statistical/ boder=off;"

Could anyone here please give me some suggestion on this?

Thanks in advance.
Fred
SAS Super FREQ
Posts: 8,743

Re: tickvalueformat in SAS sgplot & proc template

Hi:
You might want to post this question to the ODS GRAPHICS and SAS/GRAPH forum area. The people with the most experience with ODS GRAPHICS and style issues are in that forum.

In general, however, BORDER=OFF is not a valid ODS LISTING option, as shown in this LOG
[pre]
1 ods listing style = statistical/ border=off;
-
22
76
ERROR 22-322: Syntax error, expecting one of the following: ;, BODY, CLOSE, DATAPANEL, FILE,
GPATH, IMAGE_DPI, PACKAGE, SGE, STYLE.

ERROR 76-322: Syntax error, statement will be ignored.

[/pre]

The style element that controls tick fonts are shown here:
http://support.sas.com/documentation/cdl/en/grstatug/62464/HTML/default/p18c2hn0ybnntyn1t6aitke3f0l6...
GraphValueText is the style element you would need to change. For example, this style template will change the tick marks to bold and cyan, using the LISTING destination as the basic "starter" template.

cynthia

[pre]
** change group colors with style template;
ods path work.temp(update)
sasuser.templat(update)
sashelp.tmplmst(read);

proc template;
define style styles.mycyan;
parent = styles.listing;
class GraphValueText /
font = ("AlbanyAMT, Helvetica, Arial",9pt,bold)
color = cyan;
end;
run;

ods listing style=mycyan;
proc sgplot data=sashelp.heart;
vbar chol_status;
title 'Vbar: GraphValueText Changed';
xaxis discreteorder=data;
run;
[/pre]
Contributor
Posts: 56

Re: tickvalueformat in SAS sgplot & proc template

Hi Cynthia,

Thanks for your reply.

My bad. it should be:
ods graphics on/border=off;
ods listing style = statistical;

I will look at your suggestion.

Thanks and regards

Fred
Ask a Question
Discussion stats
  • 2 replies
  • 798 views
  • 0 likes
  • 2 in conversation