BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
vijnad
Fluorite | Level 6

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:output_image.png

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;

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

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.

View solution in original post

10 REPLIES 10
ChrisHemedinger
Community Manager

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.

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
vijnad
Fluorite | Level 6

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

ChrisHemedinger
Community Manager

I see. Try using the OBJECTLABEL statement as well, and see if that overrides the default.

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
vijnad
Fluorite | Level 6
Thanks so much for your reply! Specifically, I am facing this issue with .SVG files. when I am generating .SVG images, the procedure 'The SG Render Procedure' is showing with every mouse click. I had tried with other procedures and same issue with .SVG files. Please suggest
vijnad
Fluorite | Level 6

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!

Reeza
Super User
Can you post a small fully reproducible example so we can test?
FreelanceReinh
Jade | Level 19

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.

vijnad
Fluorite | Level 6

Thanks so much FreelanReinh! This solution worked perfect!

Tom
Super User Tom
Super User

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;
DanH_sas
SAS Super FREQ

What happens if you set DESCRIPTION=" " on the SGRENDER procedure statement?

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 10 replies
  • 575 views
  • 11 likes
  • 6 in conversation