Data visualization with SAS programming

Can't see the legend description in the graph

Accepted Solution Solved
Reply
Contributor
Posts: 60
Accepted Solution

Can't see the legend description in the graph

Hi i can't not see the description for my legend all i see is the assign number can some one help me.

 

here is the code.

 

/* -------------------------------------------------------------------
   Code generated by SAS Task

   Generated on: Thursday, May 4, 2017 at 1:08:28 PM
   By task: Map Chart

   Map Data: SASApp:MAPSGFK.US_COUNTIES   Response Data: SASApp:WORK.ADDCOUNTYID   Server: SASApp
   ------------------------------------------------------------------- */

%_eg_conditional_dropds(WORK.MAPCHARTMAPPREP);
PROC SQL;
 CREATE VIEW WORK.MAPCHARTMAPPREP AS
  SELECT *
  FROM MAPSGFK.US_COUNTIES
  WHERE STATECODE = 'NC'
  ;
QUIT;

%_eg_conditional_dropds(WORK.MAPCHARTRESPONSEPREP);
PROC SQL;
 CREATE VIEW WORK.MAPCHARTRESPONSEPREP AS
  SELECT *
  FROM WORK.deviations_by_county
  ;
QUIT;

GOPTIONS RESET=ALL DEVICE=html5;  /* Modified by Ahsan */


PATTERN1 VALUE=SOLID COLOR=CX99CC00;
PATTERN2 VALUE=SOLID COLOR=WHITE;
PATTERN3 VALUE=SOLID COLOR=YELLOW;
PATTERN4 VALUE=SOLID COLOR=CXFF6600;
PATTERN5 VALUE=SOLID COLOR=RED;

LEGEND1
 DOWN=5
 FRAME
 LABEL=( FONT='Times New Roman' HEIGHT=14pt JUSTIFY=LEFT   "Light green counties have unusually LOW per enrollee spending. "
   FONT='Times New Roman' HEIGHT=14pt JUSTIFY=LEFT   "White counties have spending per enrollee that is within plus or minus one standard deviation from the mean.                                          "
   FONT='Times New Roman' HEIGHT=14pt JUSTIFY=LEFT   "Yellow, orange, and red counties have unusually HIGH per enrollee spending.")
 ;

TITLE;FOOTNOTE;

TITLE1 "NEMT Per Medicaid Enrollee Spend by County";
TITLE2 "Standard Deviations Above or Below Average";

FOOTNOTE1 "";

ods _ALL_ close;  /* Modified by SAS */
ods html5 path='/sas/RA/nc_dhhs/OIA/ContinuousAudit/ContinuousAuditShared/CommonResources/ExampleMapProject' (url=none)
          file='test.htm' (title="NEMT spending by county") style=htmlblue
          options(bitmap_mode='inline');    /* Modified by SAS */

PROC GMAP GOUT=MAPCHART DATA=WORK.MAPCHARTRESPONSEPREP MAP=WORK.MAPCHARTMAPPREP ALL;
 ID STATE COUNTY;
 choro Deviations /
  WOUTLINE=1
  CDEFAULT=BLACK
  DISCRETE
  LEGEND=LEGEND5 html=tooltip
  ;
RUN;
QUIT;

TITLE;FOOTNOTE;

GOPTIONS RESET=LEGEND5;

GOPTIONS RESET=PATTERN;

GOPTIONS CBACK=;

ODS _ALL_ CLOSE;

%_eg_conditional_dropds(WORK.MAPCHARTRESPONSEPREP);
%_eg_conditional_dropds(WORK.MAPCHARTMAPPREP);

/* -------------------------------------------------------------------
   End of task code
   ------------------------------------------------------------------- */

 

 

 

 


Accepted Solutions
Highlighted
Solution
‎02-06-2018 04:34 PM
Super User
Posts: 13,556

Re: Can't see the legend description in the graph


Ahsan wrote:

When modified the code i got this warning

 

WARNING: Font Times New Roman could not be used.

Font Albany AMT substituted for font Times New Roman.

WARNING: There is not enough room for even one legend entry and the label.

WARNING: The legend has been suppressed.

 

Please help.


Reduce your font sizes and the amount of label text, make sure to use your defined legend Legend = Legend1, and you may want to specify a location for your legend.

 

 

View solution in original post


All Replies
Contributor
Posts: 60

Re: Can't see the legend description in the graph

This is the log
1 The SAS System 16:01 Monday, February 5, 2018

1 ;*';*";*/;quit;run;
2 OPTIONS PAGENO=MIN;
3 %LET _CLIENTTASKLABEL='CHORO map with tooltips for mouseover - SAS edited (2) (2) (2) (2) (2) (2) (2) (2) (2) (2) (2) (2)
3 ! (2) (2) (2) (2) (2) (2)';
4 %LET
4 ! _CLIENTPROJECTPATH='/sas/RA/nc_dhhs/OIA/ContinuousAudit/ContinuousAuditShared/CommonResources/ExampleMapProject/Example
4 ! map project.egp';
5 %LET _CLIENTPROJECTNAME='Example map project.egp';
6 %LET _SASPROGRAMFILE=;
7
8 ODS _ALL_ CLOSE;
9 OPTIONS DEV=ACTIVEX;
10 FILENAME EGSR TEMP;
11 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
12 STYLE=HtmlBlue
13 STYLESHEET=(URL="file:///E:/SAS%20Installs/SASHome/SASEnterpriseGuide/7.1/Styles/HtmlBlue.css")
14 NOGTITLE
15 NOGFOOTNOTE
16 GPATH=&sasworklocation
17 ENCODING=UTF8
18 options(rolap="on")
19 ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
20
21 /* -------------------------------------------------------------------
22 Code generated by SAS Task
23
24 Generated on: Thursday, May 4, 2017 at 1:08:28 PM
25 By task: Map Chart
26
27 Map Data: SASApp:MAPSGFK.US_COUNTIES Response Data: SASApp:WORK.ADDCOUNTYID Server: SASApp
28 ------------------------------------------------------------------- */
29
30 %_eg_conditional_dropds(WORK.MAPCHARTMAPPREP);
31 PROC SQL;
32 CREATE VIEW WORK.MAPCHARTMAPPREP AS
33 SELECT *
34 FROM MAPSGFK.US_COUNTIES
35 WHERE STATECODE = 'NC'
36 ;
NOTE: SQL view WORK.MAPCHARTMAPPREP has been defined.
37 QUIT;
NOTE: PROCEDURE SQL used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds


38
39 %_eg_conditional_dropds(WORK.MAPCHARTRESPONSEPREP);
40 PROC SQL;
41 CREATE VIEW WORK.MAPCHARTRESPONSEPREP AS
42 SELECT *
43 FROM WORK.deviations_by_county
44 ;
NOTE: SQL view WORK.MAPCHARTRESPONSEPREP has been defined.
45 QUIT;
NOTE: PROCEDURE SQL used (Total process time):
real time 0.00 seconds
2 The SAS System 16:01 Monday, February 5, 2018

cpu time 0.00 seconds


46
47 GOPTIONS RESET=ALL DEVICE=html5; /* Modified by SAS */
48
49
50 PATTERN1 VALUE=SOLID COLOR=CX99CC00;
51 PATTERN2 VALUE=SOLID COLOR=WHITE;
52 PATTERN3 VALUE=SOLID COLOR=YELLOW;
53 PATTERN4 VALUE=SOLID COLOR=CXFF6600;
54 PATTERN5 VALUE=SOLID COLOR=RED;
55
56 LEGEND1
57 DOWN=5
58 FRAME
59 LABEL=( FONT='Times New Roman' HEIGHT=14pt JUSTIFY=LEFT "Light green counties have unusually LOW per enrollee
59 ! spending. "
60 FONT='Times New Roman' HEIGHT=14pt JUSTIFY=LEFT "White counties have spending per enrollee that is within plus or
60 ! minus one standard deviation from the mean. "
61 FONT='Times New Roman' HEIGHT=14pt JUSTIFY=LEFT "Yellow, orange, and red counties have unusually HIGH per enrollee
61 ! spending.")
62 ;
63
64 TITLE;FOOTNOTE;
65
66 TITLE1 "NEMT Per Medicaid Enrollee Spend by County";
67 TITLE2 "Standard Deviations Above or Below Average";
68
69 FOOTNOTE1 "";
70
71 ods _ALL_ close; /* Modified by SAS */
72 ods html5 path='/sas/RA/nc_dhhs/OIA/ContinuousAudit/ContinuousAuditShared/CommonResources/ExampleMapProject' (url=none)
73 file='test.htm' (title="NEMT spending by county") style=htmlblue
74 options(bitmap_mode='inline'); /* Modified by SAS */
NOTE: Writing HTML5 Body file: test.htm
WARNING: Invalid device 'HTML5' for HTML5 destination. Using default device 'SVG'.
75
76 PROC GMAP GOUT=MAPCHART DATA=WORK.MAPCHARTRESPONSEPREP MAP=WORK.MAPCHARTMAPPREP ALL;
77 ID STATE COUNTY;
78 choro Deviations /
79 WOUTLINE=1
80 CDEFAULT=BLACK
81 DISCRETE
82 LEGEND=LEGEND5 html=tooltip
83 ;
84 RUN;

WARNING: Legend statement 5 could not be found. The default legend description will be used.
NOTE: Foreground color WHITE same as background. Part of your graph might not be visible.
85 QUIT;

NOTE: There were 100 observations read from the data set WORK.DEVIATIONS_BY_COUNTY.
NOTE: There were 52655 observations read from the data set MAPSGFK.US_COUNTIES.
WHERE (STATECODE='NC') and (RESOLUTION<=4);
NOTE: There were 52655 observations read from the data set WORK.MAPCHARTMAPPREP.
WHERE resolution<=4;
NOTE: PROCEDURE GMAP used (Total process time):
3 The SAS System 16:01 Monday, February 5, 2018

real time 0.19 seconds
cpu time 0.19 seconds


86
87 TITLE;FOOTNOTE;
88
89 GOPTIONS RESET=LEGEND5;
WARNING: Invalid value specified for RESET.
90
91 GOPTIONS RESET=PATTERN;
92
93 GOPTIONS CBACK=;
94
95 ODS _ALL_ CLOSE;
96
97 %_eg_conditional_dropds(WORK.MAPCHARTRESPONSEPREP);
NOTE: View WORK.MAPCHARTRESPONSEPREP has been dropped.
NOTE: PROCEDURE SQL used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds


98 %_eg_conditional_dropds(WORK.MAPCHARTMAPPREP);
NOTE: View WORK.MAPCHARTMAPPREP has been dropped.
NOTE: PROCEDURE SQL used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds


99
100 /* -------------------------------------------------------------------
101 End of task code
102 ------------------------------------------------------------------- */
103
104
105
106
107
108 %LET _CLIENTTASKLABEL=;
109 %LET _CLIENTPROJECTPATH=;
110 %LET _CLIENTPROJECTNAME=;
111 %LET _SASPROGRAMFILE=;
112
113 ;*';*";*/;quit;run;
114 ODS _ALL_ CLOSE;
115
116
117 QUIT; RUN;
118
Contributor
Posts: 60

Re: Can't see the legend description in the graph

When modified the code i got this warning

 

WARNING: Font Times New Roman could not be used.

Font Albany AMT substituted for font Times New Roman.

WARNING: There is not enough room for even one legend entry and the label.

WARNING: The legend has been suppressed.

 

Please help.

Highlighted
Solution
‎02-06-2018 04:34 PM
Super User
Posts: 13,556

Re: Can't see the legend description in the graph


Ahsan wrote:

When modified the code i got this warning

 

WARNING: Font Times New Roman could not be used.

Font Albany AMT substituted for font Times New Roman.

WARNING: There is not enough room for even one legend entry and the label.

WARNING: The legend has been suppressed.

 

Please help.


Reduce your font sizes and the amount of label text, make sure to use your defined legend Legend = Legend1, and you may want to specify a location for your legend.

 

 

Super User
Posts: 13,556

Re: Can't see the legend description in the graph

This message may explain part of why you can't see the legend:

 

WARNING: Legend statement 5 could not be found. The default legend description will be used.
NOTE: Foreground color WHITE same as background. Part of your graph might not be visible.
85 QUIT;

 

Your code defines a legend1 but you used legend5 in the code.

A similar warning about using the incorrect image device is another potential troublemaker

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 195 views
  • 0 likes
  • 2 in conversation