BookmarkSubscribeRSS Feed
Mario_1
Calcite | Level 5

I have different plots and graphs in my code that initially printed with colors as required.

However, after restarting my windows PC and rerun my codes, all the plots and graphs are displayed as grey/white.

 

In the log I suddenly see the following when plotting:

"WARNING: Could not locate style 'text'.

and when creating tables:

"WARNING: Could not locate style 'html'.

I have checked that output style in preferences is set to HTMLBlue, and I never changed it. I am using SAS 9.4

Sample code I run is from following 

https://support.sas.com/documentation/cdl/en/grstatproc/62603/HTML/default/viewer.htm#a003199396.htm

proc sgplot data=sashelp.stocks (where=(date >= "01jan2000"d
                                 and date <= "01jan2001"d
                                 and stock = "IBM"));
   title "Stock Volume vs. Close";
   vbar date / response=volume;
   vline date / response=close y2axis;
run;

and my result is the following:

unnamed.png

How can I have the tables and plots to show colors again?

 

 

16 REPLIES 16
yabwon
Meteorite | Level 14

Probably your ODS destination point to monochrome style (e.g Journal)

See:

ods HTML style=HtmlBlue;

proc sgplot data=sashelp.stocks (where=(date >= "01jan2000"d
                                 and date <= "01jan2001"d
                                 and stock = "IBM"));
   title "Stock Volume vs. Close";
   vbar date / response=volume;
   vline date / response=close y2axis;
run;

ods HTML style=Journal;

proc sgplot data=sashelp.stocks (where=(date >= "01jan2000"d
                                 and date <= "01jan2001"d
                                 and stock = "IBM"));
   title "Stock Volume vs. Close";
   vbar date / response=volume;
   vline date / response=close y2axis;
run;

Bart

 

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



Mario_1
Calcite | Level 5

Unfortunately still does not work with the following log and both show same colour

unnamed_2.png

unnamed_1.png

 

Log is following:

 

8    ods HTML style=HtmlBlue;
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
9
10   proc sgplot data=sashelp.stocks (where=(date >= "01jan2000"d
11                                    and date <= "01jan2001"d
12                                    and stock = "IBM"));
13      title "Stock Volume vs. Close";
14      vbar date / response=volume;
15      vline date / response=close y2axis;
16   run;

NOTE: PROCEDURE SGPLOT used (Total process time):
      real time           0.22 seconds
      cpu time            0.03 seconds

NOTE: There were 12 observations read from the data set SASHELP.STOCKS.
      WHERE (date>='01JAN2000'D and date<='01JAN2001'D) and (stock='IBM');

17
18   ods HTML style=Journal;
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'html'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
19
20   proc sgplot data=sashelp.stocks (where=(date >= "01jan2000"d
21                                    and date <= "01jan2001"d
22                                    and stock = "IBM"));
23      title "Stock Volume vs. Close";
24      vbar date / response=volume;
25      vline date / response=close y2axis;
26   run;

NOTE: PROCEDURE SGPLOT used (Total process time):
      real time           0.22 seconds
      cpu time            0.03 seconds

NOTE: There were 12 observations read from the data set SASHELP.STOCKS.
      WHERE (date>='01JAN2000'D and date<='01JAN2001'D) and (stock='IBM');
yabwon
Meteorite | Level 14

Do you have any autoexec file on start of your system? or do you %include anything before running your example?

 

Bart

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



yabwon
Meteorite | Level 14

Could you also try adding:

ods _all_ close;

before the code?

 

Bart

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



yabwon
Meteorite | Level 14

and additionally at the beginning try adding also:

ods path work.tmp(update) sasuser.templat(update) sashelp.tmplmst(read);

Bart

 

 

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



Mario_1
Calcite | Level 5

it's an empty SAS file with no include and no autoexec file

 

Adding ods all close

103  ods all close;
104  ods HTML style=HtmlBlue;
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
NOTE: Writing HTML Body file: sashtml2.htm
105  proc sgplot data=sashelp.stocks (where=(date >= "01jan2000"d
106                                   and date <= "01jan2001"d
107                                   and stock = "IBM"));
108     title "Stock Volume vs. Close";
109     vbar date / response=volume;
110     vline date / response=close y2axis;
111  run;

NOTE: PROCEDURE SGPLOT used (Total process time):
      real time           0.47 seconds
      cpu time            0.20 seconds

NOTE: There were 12 observations read from the data set SASHELP.STOCKS.
      WHERE (date>='01JAN2000'D and date<='01JAN2001'D) and (stock='IBM');
112  ods path work.tmp(update) sasuser.templat(update) sashelp.tmplmst(read);
113
114
115  ods all close;
116  ods HTML style=HtmlBlue;
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
NOTE: Writing HTML Body file: sashtml3.htm
117  proc sgplot data=sashelp.stocks (where=(date >= "01jan2000"d
118                                   and date <= "01jan2001"d
119                                   and stock = "IBM"));
120     title "Stock Volume vs. Close";
121     vbar date / response=volume;
122     vline date / response=close y2axis;
123  run;

NOTE: PROCEDURE SGPLOT used (Total process time):
      real time           0.48 seconds
      cpu time            0.11 seconds

NOTE: There were 12 observations read from the data set SASHELP.STOCKS.
      WHERE (date>='01JAN2000'D and date<='01JAN2001'D) and (stock='IBM');
Mario_1
Calcite | Level 5
03  ods all close;
104  ods HTML style=HtmlBlue;
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
NOTE: Writing HTML Body file: sashtml2.htm
105  proc sgplot data=sashelp.stocks (where=(date >= "01jan2000"d
106                                   and date <= "01jan2001"d
107                                   and stock = "IBM"));
108     title "Stock Volume vs. Close";
109     vbar date / response=volume;
110     vline date / response=close y2axis;
111  run;

NOTE: PROCEDURE SGPLOT used (Total process time):
      real time           0.47 seconds
      cpu time            0.20 seconds

NOTE: There were 12 observations read from the data set SASHELP.STOCKS.
      WHERE (date>='01JAN2000'D and date<='01JAN2001'D) and (stock='IBM');
112  ods path work.tmp(update) sasuser.templat(update) sashelp.tmplmst(read);
113
114
115  ods all close;
116  ods HTML style=HtmlBlue;
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
NOTE: Writing HTML Body file: sashtml3.htm
117  proc sgplot data=sashelp.stocks (where=(date >= "01jan2000"d
118                                   and date <= "01jan2001"d
119                                   and stock = "IBM"));
120     title "Stock Volume vs. Close";
121     vbar date / response=volume;
122     vline date / response=close y2axis;
123  run;

NOTE: PROCEDURE SGPLOT used (Total process time):
      real time           0.48 seconds
      cpu time            0.11 seconds

NOTE: There were 12 observations read from the data set SASHELP.STOCKS.
      WHERE (date>='01JAN2000'D and date<='01JAN2001'D) and (stock='IBM');

there is no autoexec and no include, it's a new file with just the sample code you gave.

@yabwon 

Mario_1
Calcite | Level 5
103  ods all close;
104  ods HTML style=HtmlBlue;
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
NOTE: Writing HTML Body file: sashtml2.htm
105  proc sgplot data=sashelp.stocks (where=(date >= "01jan2000"d
106                                   and date <= "01jan2001"d
107                                   and stock = "IBM"));
108     title "Stock Volume vs. Close";
109     vbar date / response=volume;
110     vline date / response=close y2axis;
111  run;

NOTE: PROCEDURE SGPLOT used (Total process time):
      real time           0.47 seconds
      cpu time            0.20 seconds

NOTE: There were 12 observations read from the data set SASHELP.STOCKS.
      WHERE (date>='01JAN2000'D and date<='01JAN2001'D) and (stock='IBM');
112  ods path work.tmp(update) sasuser.templat(update) sashelp.tmplmst(read);
113
114
115  ods all close;
116  ods HTML style=HtmlBlue;
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
NOTE: Writing HTML Body file: sashtml3.htm
117  proc sgplot data=sashelp.stocks (where=(date >= "01jan2000"d
118                                   and date <= "01jan2001"d
119                                   and stock = "IBM"));
120     title "Stock Volume vs. Close";
121     vbar date / response=volume;
122     vline date / response=close y2axis;
123  run;

NOTE: PROCEDURE SGPLOT used (Total process time):
      real time           0.48 seconds
      cpu time            0.11 seconds

NOTE: There were 12 observations read from the data set SASHELP.STOCKS.
      WHERE (date>='01JAN2000'D and date<='01JAN2001'D) and (stock='IBM');

there is no include nor autoexec file, as it's a new file with your example

ballardw
Super User

I wonder if something has modified your STYLE definition.

 

We can check this by running:

proc template;
  source styles.htmlblue;
run;

The log should show something like this at the start:

202  proc template;
203    source styles.htmlblue;
define style Styles.Htmlblue;
   parent = styles.statistical;
   class GraphColors /

We are looking for the PARENT=, if it is not styles.statistical then the Htmlblue style has been modified. Additional information at the end of the log for that should include something like:

NOTE: Path 'Styles.Htmlblue' is in: SASHELP.TMPLMST.

If the Path is not SASHELP.TMPLMST then very likely the HTMLBlue style has been modified and the path for your templates is finding a different one.

If the Htmlblue is not showing different values then run the same code for Styles.Statistical and check on the same items. The parent for Statistical should be Default and should also be in the SASHELP.TMPLMST store. If not then find the store it is in and remove or rename it.

Then same for Styles.Default. But here you are looking for a CLASS Text section as Default should not have a parent. If it does something wonky is going on. If the path is different than

One really hopes that no one played with Styles.Default. The "text" referenced could be some standard values that other styles call and if the section in Styles.Default that defines them has been altered from SASHELP.TMPLMST then that is the issue. Hope there is still Styles.default in the SASHELP.TMPLMST.

 

Warning: if you are running SAS in any server manner then you likely have to talk to the SAS admin about changes to the item stores for the styles as you likely do not have permissions to change them.

 

If you do indeed see some issues with the results then likely you ran some Proc Template code somewhere. It may have been buried in a borrowed macro or example code for a specific purpose and did not realize the effect of Proc Template persists across sessions.

 

If your are running SAS locally then you can delete styles from specific path with code like this.

Proc template;
   path lib.store; 
   /* these would be the paths reported in the other code DO NOT 
      use SASHELP.TMPLMST as those are the default installs*/
   delete styles.statistical;
   /* or which ever of the styles were not in TMPLMST*/
run;

 

 

 

 

 

Mario_1
Calcite | Level 5

no autoexec file or include as it's an empty new sas file with your sample

 

103  ods all close;
104  ods HTML style=HtmlBlue;
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
(and so on)

and the other result

112  ods path work.tmp(update) sasuser.templat(update) sashelp.tmplmst(read);
113
114
115  ods all close;
116  ods HTML style=HtmlBlue;
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.

 

 

 

 

ballardw
Super User

@Mario_1 wrote:

no autoexec file or include as it's an empty new sas file with your sample

 

103  ods all close;
104  ods HTML style=HtmlBlue;
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.
(and so on)

and the other result

112  ods path work.tmp(update) sasuser.templat(update) sashelp.tmplmst(read);
113
114
115  ods all close;
116  ods HTML style=HtmlBlue;
WARNING: Could not locate style 'text'.
WARNING: Could not locate style 'text'.

 


This bit

112  ods path work.tmp(update) sasuser.templat(update) sashelp.tmplmst(read);

with the UPDATE means that you have TWO stores that modified. That means if either Work.tmp or sasuser.templat have versions of Htmlblue, Statistics or Default they would be the one used. SASUSER.TEMPLAT is provided by SAS as an intended place to write modified or new style definitions (among other things).

Mario_1
Calcite | Level 5
I unfortunately can not post , mod removed it as spam. However, the result is

103 ods all close;
104 ods HTML style=HtmlBlue;
WARNING: Could not locate style 'text'.

and the other one is
112 ods path work.tmp(update) sasuser.templat(update) sashelp.tmplmst(read);
113
114
115 ods all close;
116 ods HTML style=HtmlBlue;
WARNING: Could not locate style 'text'.
Mario_1
Calcite | Level 5
(unfortunately my reply is always removed by mod)

I added _all_close but nothing change.
I also added the last line you mentioned , and in the lines follow that command, there are only two empty lines followed by could not locate style 'text'
yabwon
Meteorite | Level 14

"However, after restarting my windows PC" - ok, so what did you do before restarting?

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 16 replies
  • 656 views
  • 2 likes
  • 4 in conversation