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

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

1 ACCEPTED SOLUTION

Accepted Solutions
tanyuanbin
Calcite | Level 5

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

7 REPLIES 7
AncaTilea
Pyrite | Level 9

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,

tanyuanbin
Calcite | Level 5

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

GraphGuy
Meteorite | Level 14

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?)

GraphGuy
Meteorite | Level 14

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

tanyuanbin
Calcite | Level 5

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

XingyunLin
SAS Employee

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

tanyuanbin
Calcite | Level 5

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

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!

How to Concatenate Values

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.

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
  • 7 replies
  • 1161 views
  • 6 likes
  • 4 in conversation