BookmarkSubscribeRSS Feed
Bob_P
Calcite | Level 5

I just moved from SAS 9.3 to SAS 9.4 and I'm trying to export a graph from proc gchart to a cgm file that I import into CorelDraw X5. I had been using device cgmlt97l but isn't available in 9.4 so I'm using cgmof97l instead. The graph is looking OK when it is imported into CorelDraw, but text from the annotations is curves instead of a font. Text from the rest of the chart in coming in as Helvetica. I'm pretty sure that it all came in as text before. Can anyone tell me what I need to change to get all the text to come in as text so I can manipulate it in CorelDraw as text? I’ve attached the three data files I am using and the graph I made last year with SAS 9.3 and CorelDraw X5 and I’ve included my code below. My operating system is Windows 7 64-bit. Thanks for any help you can provide.

Bob

goptions ftext=none dev=cgmof97l gsfname=grafout gsfmode=replace lfactor=9;

filename grafout 'c:\data\gi\soilh2o\soilh2o.cgm';

title1 h=.4 cm 'Total Water in Inches';

title2 h=.4 cm '2014 Soil Water to 2.5 Feet on Loamy Ecological Sites';

footnote1 h=2 ' ';

footnote2 j=l h=.299 cm 'Total water in soil profile to the two and one half foot depth on loamy ecological';

footnote3 j=l h=.149 cm ' ';

footnote4 j=l h=.299 cm 'sites at the Central Grasslands Research Extension Center in 2014.';

axis1 order=0 to 18 by 1 label=none value=(h=0.3 cm) major=(w=3) minor=none width=3;

axis2 value=(h=0.21 cm) width=3;

pattern c=black v=e;

proc gchart data=m2014sm annotate=legend;

   vbar day/type=mean sumvar=twlyrto

           axis=axis1 maxis=axis2

           midpoints='01apr00'd '15apr00'd '01may00'd '15may00'd

                     '01jun00'd '15jun00'd '01jul00'd '15jul00'd

                     '01aug00'd '15aug00'd '01sep00'd '15sep00'd

                     '01oct00'd '15oct00'd '01nov00'd '15nov00'd '01dec00'd

           space=0.65 annotate=annavetd;

   label day='Date';

   format twlyrto 2.0;

run;

quit;

1 REPLY 1
Bob_P
Calcite | Level 5

I received help from SAS support. I'll post the reply in case anyone else comes looking here for the answer:

I made some fairly minor changes to your original SAS code and have attached the modified code to this email.  When you have time, submit the attached code to SAS and let me know what happens.  The biggest change I made to your SAS code is to make sure that SAS is creating your graphics output where all of the text on the graph is created using the Helvetica hardware font.  When using a CGM device driver, you do this by specifying in your code the font name of HWCGM001. 

This is why the modified GOPTIONS statement now looks like this:

goptions reset=all device=cgmof97l gsfname=grafout gsfmode=replace lfactor=9

ftext=HWCGM001 ftitle=HWCGM001; 

I also noticed that since both of your Annotate data sets use the old SAS software font with the name of SWISS, I modified both Annotate data sets to change the old SWISS font to the HWCGM001 hardware font. 

With the attached code, you might have to "tweak" the code a bit more (perhaps adjusting some text heights and text positioning).  But the attached code should get you pretty close to what you are looking for. 

Regards, Martin

------------------------------

Martin Mincey


Thanks again Martin for your help.


Bob

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
  • 1 reply
  • 865 views
  • 0 likes
  • 1 in conversation