BookmarkSubscribeRSS Feed
P5C768
Obsidian | Level 7

Are there any output options for PROC GMAP that don't produce two separate files in the output destination?  I have tried using goptions=png and goptions=gif, but both of them produce two files for each map, a .htm file and a .png file.  I am running a loop that creates hundred of maps using gmaps, which I want to output and then use the image files to create a animated GIF, so I would like to avoid duplication of the files if possible.

Also, is there a way to control the names of the output?  I.e. changing them from gmap1, gmap2 etc. to something more descriptive?

Thanks!

3 REPLIES 3
GraphGuy
Meteorite | Level 14

You can control the name of the .png file by using the name= option after the /

For example...

choro sales / levels=5 name="foo";

It is often handy to use a macro variable's value for the name, or If you're using 'by' processing you can use the by-value.

If you're using ods html, I think it's going to create an html file.  Probably easiest to just delete them, or always use the same html file name (so it is overwritten each time).

P5C768
Obsidian | Level 7

Is there another ODS besides HTML that I could use to produce pictures from PROC GMAP? 

ballardw
Super User

It's been awhile since I used this method but there's a graphics option GSFNAME. No ods destination needed.

You would need some thing like this with a different name in each file ref before the gmap call, pick a device that generates the desired output type, GIF, PNG whatever, and have the extention match. Up to you to put your name in the filename. If you have a data set with the names and parameters Call Execute might be the best way to control the process.

filename fileref 'filename.XXX';

goptions device=devicename gsfname=fileref

  gsfmode=replace; /* replace in case you rerun the code you don't want the graphs appending*/

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 3 replies
  • 2467 views
  • 0 likes
  • 3 in conversation