Hi,
I am trying to disable procedure title 'The SG Render Procedure' by using ODS NO PROCTITLE ; while generating .svg graph, this is not working, not sure where this is going wrong. can you please help. Thanks!
Here is the output image and code:
ods _all_ close;
ods NOPROCTITLE ;
ods html gpath="&figout" style=groupstyle image_dpi=300 ;
filename image1 "&figout/%sysfunc(tranwrd(&tlfname,-,_)).svg" ;
ods graphics on/ reset = index imagename="%sysfunc(tranwrd(&tlfname,-,_))" imagefmt=svg ;
proc sgrender data=final template=swimmer;
dynamic bartype="&bartype";
run;
ods html close;
Hello @vijnad,
If all else fails, you can at least avoid the occurrence of the text "The SGRender Procedure" anywhere in the graph by post-processing the SVG file (which is a text file luckily). In the example below I remove the text in a new SVG file named with the suffix "_clean", but you can replace the text by something more descriptive in the third argument of the TRANSTRN function as well.
data _null_;
infile "&figout/%sysfunc(tranwrd(&tlfname,-,_)).svg";
file "&figout/%sysfunc(tranwrd(&tlfname,-,_))_clean.svg";
input;
_infile_=transtrn(_infile_,'The SGRender Procedure',trimn(''));
put _infile_;
run;
If this still leaves unwanted elements in the graph (it did not in my tests), you can remove the corresponding SVG code by adding similar calls to the TRANSTRN function with a different second argument.
Do you have an ENTRYTITLE statement in your "Swimmer" template? This allows you to control the title for the graph as it is rendered in SGRENDER.
Thank you!
Yes I had used the entry title statement with the title of graph in template as below. Please suggest if any option in entrytitle statement that disables the procedure title 'The SG Render Procedure'. It's still coming up.
proc template;
define statgraph swimmer;
dynamic bartype;
begingraph/designwidth=9in designheight=5.15in border=false;
entrytitle "Swimmer Plot"/textattrs=(family="Courier New" size=10pt weight=bold);
I see. Try using the OBJECTLABEL statement as well, and see if that overrides the default.
Thank you so much Chris Hemedinger for your suggestions! I have tried all your recommends, still procedure title is showing on the image of .svg file. I have to create many .svg images and please advise if any that probably removes procedure title from .svg files.
Really appreciate your help!
Hello @vijnad,
If all else fails, you can at least avoid the occurrence of the text "The SGRender Procedure" anywhere in the graph by post-processing the SVG file (which is a text file luckily). In the example below I remove the text in a new SVG file named with the suffix "_clean", but you can replace the text by something more descriptive in the third argument of the TRANSTRN function as well.
data _null_;
infile "&figout/%sysfunc(tranwrd(&tlfname,-,_)).svg";
file "&figout/%sysfunc(tranwrd(&tlfname,-,_))_clean.svg";
input;
_infile_=transtrn(_infile_,'The SGRender Procedure',trimn(''));
put _infile_;
run;
If this still leaves unwanted elements in the graph (it did not in my tests), you can remove the corresponding SVG code by adding similar calls to the TRANSTRN function with a different second argument.
Thanks so much FreelanReinh! This solution worked perfect!
Those elements are the DESCRIPTION of the image.
At least with PROC SGPLOT you can control that yourself.
proc sgplot data=sashelp.cars description='sashelp.cars';
vbar type;
run;
What happens if you set DESCRIPTION=" " on the SGRENDER procedure statement?
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
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.