I have a heat map graph written in GTL that works fine except that instead of each cell producing a separate image the image file that is produced show all cells in a single image. What I want is to have each image in its own image file. The statement I am using to build the graph layout is LAYOUT LATTICE / ROWS=6 COLUMNDATARANGE=UNION ;. Is there something I can change anywhere in the graph definition to get separate image files? And I don’t know if it matters but I am running this on z/OS. The opening and one cell definition follow
BEGINGRAPH;
DISCRETEATTRVAR ATTRVAR=mapcgp VAR=mapgp ATTRMAP="mapcpu" ;
DISCRETEATTRVAR ATTRVAR=mapczip VAR=mapzip ATTRMAP="mapcpu" ;
DISCRETEATTRVAR ATTRVAR=mapelig VAR=mapzie ATTRMAP="mapzelig" ;
DISCRETEATTRVAR ATTRVAR=mapscrt VAR=mapscrt ATTRMAP="mapscrt" ;
DISCRETEATTRVAR ATTRVAR=maplo_g VAR=maplo_g ATTRMAP="mapzelig" ;
DISCRETEATTRVAR ATTRVAR=maplo_z VAR=maplo_z ATTRMAP="mapzelig" ;
LAYOUT LATTICE / ROWS=6 COLUMNDATARANGE=UNION ;
CELL; *GPs ;
CELLHEADER;
ENTRY "GPs" / BORDER=FALSE TEXTATTRS=(WEIGHT=BOLD) ;
ENDCELLHEADER;
LAYOUT overlay /
XAXISOPTS=(DISPLAY=(TICKVALUES LINE))
YAXISOPTS=(DISPLAY=(TICKVALUES LINE)
TIMEOPTS=(VIEWMIN=monthbeg VIEWMAX=monthend INTERVAL=DAY)) ;
HEATMAPPARM X=time Y=date COLORGROUP=mapcgp /
DISPLAY=STANDARD
NAME="enggp"
ROLENAME=(_ueng=usedgps _ceng=cecgps _oeng=onlgps
_leng=lpargps)
TIP=(X Y _ceng _leng _oeng _ueng) ;
DISCRETELEGEND "mapcpu" / TYPE=FILL ;
ENDLAYOUT;
ENDCELL;
You might want to clarify what you mean by "What I want is to have each image in its own image file.".
If you mean that the first graph goes to d:\path\image1.png and the second to d:\path.image2.png and so on then you will need to create each "image" in either a separate graphic call or possibly a BY statement in sgrender with the template used creating only one "image".
Note this from the documentation:
LAYOUT LATTICE Statement
Creates a grid of graphs that automatically aligns plot areas and tick display areas across grid cells to facilitate data comparisons among graphs.
So the intent behind lattice is a single image for comparison.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Lock in the best rate now before the price increases on April 1.
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.