BookmarkSubscribeRSS Feed
Fred_Gavin
Calcite | Level 5
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
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
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]
Fred_Gavin
Calcite | Level 5
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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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