BookmarkSubscribeRSS Feed
DonMacnaughton
Obsidian | Level 7

The NOGTITLE option of HTML output is useful so that titles can appear in the output, but they appear outside of graphs instead of cluttering up the graph itself.  I would sometimes like to be able to use NOGTITLE in the standard output from the University Edition, but I haven’t been able to find how to do that.

For example, if I try to execute the following code in the University Edition, it fails to do what it should do and generates an error message:

ods html close;

ods html nogtitle;

title 'This title should appear at the top of the output OUTSIDE the graph.';

proc sgplot data=sashelp.class;

   scatter x=height y=weight;

   run;

Is there a way that I can specify in a program NOGTITLE for the default output of the University Edition?

Thanks for your help,

Don Macnaughton

3 REPLIES 3
Cynthia_sas
SAS Super FREQ

Hi:

  When I run this code (writing explicitly to my /folders/myfolders shared location AND I open the HTML file from Windows Explorer (outside of the SAS Studio interface), I do see the title. (I added color=red to the TITLE statement) so it would stand out. Tested in PDF and HTML. Note that /folders/myfolders/all_output is my directory under the shared folders location where I write my output. On my Windows machine, the location is: C:\SASUniversityEdition\myfolders\all_output as shown in the screen shot.

Cynthia

ods pdf file='/folders/myfolders/all_output/nogtitle_test.pdf' nogtitle;

ods html  nogtitle path="/folders/myfolders/all_output/" (url=none)

         file="nogtitle_test.html" style=sasweb;

title c=red bold 'This title should appear at the top of the output OUTSIDE the graph.';

proc sgplot data=sashelp.class;

   scatter x=height y=weight;

   run;

ods html close;

ods pdf close;


nogtitle_test.pngnogtitle_pdf.pngwindows_view_of_shared_folder.png
DonMacnaughton
Obsidian | Level 7

Cynthia,

Thank you. That solution works. However, I was hoping that I could get the desired behavior in the DEFAULT SAS output. I was hoping for that outcome because I'm writing the program for students and I would like to make the program as simple as possible. Therefore, asking the students to open a separate HTML file in order to get the NOGTITLE behavior isn't an option. (Everything is complicated enough as it is.)

Is there a way I can get the NOGTITLE behavior in the DEFAULT HTML output under the University Edition (i.e., in the RESULTS pane of SAS Studio) so that I don't have to ask the students to open another file in order for them to see the output?

Don

Message was edited by: Donald Macnaughton to clarify that the desired output is desired in the RESULTS pane of SAS Studio.

Cynthia_sas
SAS Super FREQ

Hi, Don:

  That would be a question for Tech Support. I do not know how the browser interface for SAS Studio renders the HTML created by ODS. If Tech Support does not know the answer, then they can try to find out from the SAS Studio experts.

cynthia

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
  • 2006 views
  • 0 likes
  • 2 in conversation