Data visualization with SAS programming

How to fix a charactor displaying problem in a common greplay file?

Accepted Solution Solved
Reply
Contributor
Posts: 22
Accepted Solution

How to fix a charactor displaying problem in a common greplay file?

Dear All,

After replay a gplot and gchart file in a common file, the Title texts displayed incorrectly as such:

template_CN.gif

However, the first picture displayed correctly in Simplified Chinese charator when created as below:

k2IF1304_20130228_5Min.gif

It is appreciated if anyone would like to help! Thanks much in advance for your time!

Best Regards,

Yuanbin


Accepted Solutions
Solution
‎03-19-2013 08:48 AM
Contributor
Posts: 22

Re: How to fix a charactor displaying problem in a common greplay file?

Hi Xingyun,

Thank you for your time and the advice, while testing with your suggestion code, I suddenly found the problem, the device was not properly defined as gif but actximg! Smiley Happy After correct it , the replay is fine now as such:

template.png

Anyway, thank you all for your time and help!

Best Regards,

Yuanbin

View solution in original post


All Replies
Super Contributor
Posts: 543

Re: How to fix a charactor displaying problem in a common greplay file?

Hi.

could you share the code that creates the gplot/gchart and the greplay?

I feel like you should resize the window for the two individual plots (say hsize = 6in, vsize = 12in) and for the greplay you may want hsize = 12in, vsize = 12in).

Anyway, if you could post the code, it may help a bit more.

Thanks,

Anca,

Contributor
Posts: 22

Re: How to fix a charactor displaying problem in a common greplay file?

Dear Anca,


Well, I tried and resized the windows, however, the problem was still there. Since the total codes are quite long so I have to zipped them into one file, as well as data you might run to check and help. As I can't attach the zipped file and upload, how can I send the code to you? or this is my mailbox tanyb77@yahoo.com, in case you might reach me for it. Thanks a lot!
Yuanbin

SAS Employee
Posts: 967

Re: How to fix a charactor displaying problem in a common greplay file?

Could you perhaps reproduce the problem with a simpler graph (that way you don't have to send the long code & data).

Perhaps try to Greplay 2 "Proc Gslide"s with some Chinese text in the title, such as ...

title1 "Here is some text";

title2 "Here is some more text";

proc gslide name='graph1';

run;

Also, are you running a 'special' version of SAS, or just the regular one? (such as, with the Chinese pull-down menus?)

SAS Employee
Posts: 967

Re: How to fix a charactor displaying problem in a common greplay file?

I did some experimenting with using Chinese characters by specifying their Unicode codes, and they seem to come out ok in Greplay (although this probably isn't the way you're entering the characters).  But maybe you can adapt this simple program to the way you're entering the text...

%let name=gre003;

filename odsout '.';

goptions nodisplay;

goptions device=png noborder;

/*

Got hint about the Chinese font name from:

http://en.wikipedia.org/wiki/List_of_CJK_fonts

(then got the actual font name on my computer from Windows 'character map' program)

Got the Chinese character codes from:

http://www.khngai.com/chinese/charmap/tbluni.php?page=0

*/

title1 ls=1.5 "Gslide, using MingLiU/unicode";

title2 ls=1.5 "codes '4e08'x and '4eb0'x";

title3 ls=1.5 height=7pct  font='MingLiU/unicode' '4e08'x '4eb0'x;

goptions xpixels=400 ypixels=600;

proc gslide name='graph1'; run;

title1 ls=1.5 "Gslide, using MingLiU/unicode";

title2 ls=1.5 "codes '4ef9'x and '4eaf'x";

title3 ls=1.5 height=7pct  font='MingLiU/unicode' '4ef9'x '4eaf'x;

goptions xpixels=400 ypixels=600;

proc gslide name='graph2'; run;

goptions display;

ODS LISTING CLOSE;

ODS HTML path=odsout body="&name..htm" style=sasweb;

goptions xpixels=800 ypixels=600;

proc greplay igout=work.gseg nofs

   tc=sashelp.templt template=h2;

   treplay 1:graph1 2:graph2

   des='' name="&name";

quit;

quit;

ODS HTML CLOSE;

ODS LISTING;

(attaching the results)

gre003.png

Contributor
Posts: 22

Re: How to fix a charactor displaying problem in a common greplay file?

Dear Robert,

Thank you so much for your time to help, it must time consuming for you to come up with those suggestion!   I think it could be part of solution, and I have no good idea to display all charactors besides text in Title so far, for example, how to display the label of axis correctly? Anyhow, I need to study more in details and try to find it out.  the version of system is regular sas 9.1.3.

Thanks again for your time!

Best Regards,

Yuanbin

SAS Employee
Posts: 1

Re: How to fix a charactor displaying problem in a common greplay file?

Hi Yuanbin,

Are the two graph as you posted in the above generated in the same session (in SAS Chinese version)?

Please try to specify the ftext, ftitle with the truetypefont in your case (like below), and then confirm whether it could work or not.

goptions ftitle="SimSun" ftext="SimSun";

If this can't work, then please paste your program code (just sas code is ok, no need the data set since it can' upload in this website) in this thread, so that we can see what is the exact issue.

Thanks!

Xingyun

Solution
‎03-19-2013 08:48 AM
Contributor
Posts: 22

Re: How to fix a charactor displaying problem in a common greplay file?

Hi Xingyun,

Thank you for your time and the advice, while testing with your suggestion code, I suddenly found the problem, the device was not properly defined as gif but actximg! Smiley Happy After correct it , the replay is fine now as such:

template.png

Anyway, thank you all for your time and help!

Best Regards,

Yuanbin

☑ This topic is SOLVED.

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

Discussion stats
  • 7 replies
  • 331 views
  • 6 likes
  • 4 in conversation