- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 04-06-2010 11:08 AM
(1049 views)
Hello,
I would like to make a boxplot with SGRENDER. I am using customized format for the values of my independent variable. Now, I wanna add a superscript "[1]" in my format value and let it appear in the picture. By the way, my destination is RTF. How shall I make it? Thanks in advance!
Below is my code:
proc format;
value study 1='Neonates'
2='Infants'
3='Toddlers'
5='Children'
6='Adolencents'
7='Adults(K)\{super [1]}' /*This \{super [1]} does not work*/
11='Adults(S)'
;
run;
proc template;
define style Styles.boxplot;
parent = styles.statistical;
style GraphBox from Graphbox/
capstyle = "bracket";
style GraphBoxMean from GraphBoxMean /
markersymbol=" diamondfilled "
contrastcolor=GraphColors("gcdata1")
markersize = 3px;
end;
define statgraph box;
begingraph;
layout lattice /columns=1 rows=2;
layout overlay;
boxplot y=bw x=stud /display=(CAPS FILL MEAN MEDIAN NOTCHES OUTLIERS);
endlayout;
layout overlay;
boxplot y=pna x=stud /display=(CAPS FILL MEAN MEDIAN NOTCHES OUTLIERS);
endlayout;
endlayout;
endgraph;
end;
run;
ods rtf style= Journal;
ods ESCAPECHAR="\";
proc sgrender data=summary template=box;
run;
ods rtf close;
I would like to make a boxplot with SGRENDER. I am using customized format for the values of my independent variable. Now, I wanna add a superscript "[1]" in my format value and let it appear in the picture. By the way, my destination is RTF. How shall I make it? Thanks in advance!
Below is my code:
proc format;
value study 1='Neonates'
2='Infants'
3='Toddlers'
5='Children'
6='Adolencents'
7='Adults(K)\{super [1]}' /*This \{super [1]} does not work*/
11='Adults(S)'
;
run;
proc template;
define style Styles.boxplot;
parent = styles.statistical;
style GraphBox from Graphbox/
capstyle = "bracket";
style GraphBoxMean from GraphBoxMean /
markersymbol=" diamondfilled "
contrastcolor=GraphColors("gcdata1")
markersize = 3px;
end;
define statgraph box;
begingraph;
layout lattice /columns=1 rows=2;
layout overlay;
boxplot y=bw x=stud /display=(CAPS FILL MEAN MEDIAN NOTCHES OUTLIERS);
endlayout;
layout overlay;
boxplot y=pna x=stud /display=(CAPS FILL MEAN MEDIAN NOTCHES OUTLIERS);
endlayout;
endlayout;
endgraph;
end;
run;
ods rtf style= Journal;
ods ESCAPECHAR="\";
proc sgrender data=summary template=box;
run;
ods rtf close;
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Maurice,
This is a long shot, so if it doesn't work, I won't be surprised and apologize in advance for wasting the bandwidth.
Try changing your escapechar, to something like '^'. In my experience, '\' is unreliable as an escapechar. Why? I don't know for sure, but my theory is that: 1)
windows tries to use it as a sub-directory separator as in unix and gets confused in the ods context; 2) the RTF specification uses it as it's own escape character and ODS and RTF may be interacting in some way and so it doesn't behave as expected.
As I say, it's a long shot. Good luck.
This is a long shot, so if it doesn't work, I won't be surprised and apologize in advance for wasting the bandwidth.
Try changing your escapechar, to something like '^'. In my experience, '\' is unreliable as an escapechar. Why? I don't know for sure, but my theory is that: 1)
windows tries to use it as a sub-directory separator as in unix and gets confused in the ods context; 2) the RTF specification uses it as it's own escape character and ODS and RTF may be interacting in some way and so it doesn't behave as expected.
As I say, it's a long shot. Good luck.