Dear All,
After replay a gplot and gchart file in a common file, the Title texts displayed incorrectly as such:
However, the first picture displayed correctly in Simplified Chinese charator when created as below:
It is appreciated if anyone would like to help! Thanks much in advance for your time!
Best Regards,
Yuanbin
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! After correct it , the replay is fine now as such:
Anyway, thank you all for your time and help!
Best Regards,
Yuanbin
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,
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
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?)
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)
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
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
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! After correct it , the replay is fine now as such:
Anyway, thank you all for your time and help!
Best Regards,
Yuanbin
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.