BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
daipdo
Fluorite | Level 6

平素より大変お世話になっております。SASAIと申します。

SGPLOTのyaxistableでシングルバイト文字とマルチバイト文字でそれぞれ別のfontを設定することが出来ないかの質問をさせてください。

 

SASの9.4M5にてyaxistableのfontを指定するにはaxistableにvalueattrs = (Family='Ms Mincho')と記述すると思いますが、これだと英数字にも明朝が適用されます。日本語には明朝、英数字には例えばTimes New Romanをそれぞれ指定することは出来ますでしょうか。

 

お手数おかけしますがよろしくお願いいたします。

1 ACCEPTED SOLUTION

Accepted Solutions
yu_sas
SAS Employee

残念ながらオプションはないと思います。

 

手作業になりますが、SG AnnotationのTEXTCONT関数で別のフォントを指定するのが一案かと思います。

 

例(参考:Example 2: Create a Tabular Text Annotation)

 

data tmp; 
 infile datalines dlm='#';
 length function $8 label textfont $35;
 x1=90; x1space='graphpercent'; y1space='datavalue';
 width=40;
 input function $ label $ textcolor $ textfont $; 
 datalines; 
 text # ABC # black # MS Gothic
 textcont # テスト # green # MS Mincho
; 

proc sql;
create table anno as
select c.name as yc1, t.* 
from sashelp.class as c, tmp as t
order by name, function;
quit;

proc sgplot data=sashelp.class sganno=anno pad=(right=25%);
hbar name / response=height categoryorder=respdesc;
run;

 

 

View solution in original post

2 REPLIES 2
yu_sas
SAS Employee

残念ながらオプションはないと思います。

 

手作業になりますが、SG AnnotationのTEXTCONT関数で別のフォントを指定するのが一案かと思います。

 

例(参考:Example 2: Create a Tabular Text Annotation)

 

data tmp; 
 infile datalines dlm='#';
 length function $8 label textfont $35;
 x1=90; x1space='graphpercent'; y1space='datavalue';
 width=40;
 input function $ label $ textcolor $ textfont $; 
 datalines; 
 text # ABC # black # MS Gothic
 textcont # テスト # green # MS Mincho
; 

proc sql;
create table anno as
select c.name as yc1, t.* 
from sashelp.class as c, tmp as t
order by name, function;
quit;

proc sgplot data=sashelp.class sganno=anno pad=(right=25%);
hbar name / response=height categoryorder=respdesc;
run;

 

 

daipdo
Fluorite | Level 6

yu_sas 様

 

ご回答頂きありがとうございます。オプションではどうにもならないとのこと承知しました。

textcontを利用するのが一番ですかね。。。

 

ありがとうございました。