Data visualization with SAS programming

How can I manage SUBPIXEL for different Template

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

How can I manage SUBPIXEL for different Template

I am using SAS 9.4 L1M3, I came to know that SUBPIXEL rendering is by default ON for some plot statement like ScatterPlot. 

I want to make it OFF for all template and then want to make it enable when necessary, this is why I tried following way;

 

ODS GRAPHICS ON /RESET=all SUBPIXEL=OFF ANTIALIAS=ON ; 

*Grouping a Scatter Plot with yaxis dropline;
PROC TEMPLATE;
define statgraph dropline1;
begingraph ;
EntryTitle "Grouping a Scatter Plot with yaxis dropline" /;
layout overlay ;
   ScatterPlot X=Height Y=Weight / subpixel=on primary=true Group=Sex LegendLabel="Weight" NAME="SCATTER";
   Dropline X=70 Y=120 / clip=true DropTo=y Lineattrs=GRAPHDATA2;
   DiscreteLegend "SCATTER"/ title="Sex";
endlayout;
endgraph;
end;
RUN;

PROC SGRENDER DATA=sashelp.class TEMPLATE=dropline1;
RUN;

But its not working and Log getting following error message;

 

94 ODS GRAPHICS ON /RESET=all SUBPIXEL=OFF ANTIALIAS=ON ;
95
96 *Grouping a Scatter Plot with yaxis dropline;
97 PROC TEMPLATE;
98 define statgraph dropline1;
99 begingraph ;
100 EntryTitle "Grouping a Scatter Plot with yaxis dropline" /;
101 layout overlay ;
102 ScatterPlot X=Height Y=Weight / subpixel=on primary=true Group=Sex
--
772
102! LegendLabel="Weight" NAME="SCATTER";
ERROR 772-580: Syntax error: expecting a constant or a dynamic.
103 Dropline X=70 Y=120 / clip=true DropTo=y Lineattrs=GRAPHDATA2;
104 DiscreteLegend "SCATTER"/ title="Sex";
105 endlayout;
106 endgraph;
107 end;
WARNING: Object will not be saved.
108 RUN;
NOTE: PROCEDURE TEMPLATE used (Total process time):
real time 0.02 seconds
cpu time 0.03 seconds

WARNING: Errors were produced.
NOTE: The SAS System stopped processing this step because of errors.

 

Can you please tell me how can I resolve this?, or, Could you please let me know if there have any other thing.


Accepted Solutions
Solution
‎06-05-2017 06:06 AM
SAS Employee
Posts: 154

Re: How can I manage SUBPIXEL for different Template

AUTO

The system sets subpixel rendering OFF for this scatter plot, unless SUBPIXEL=ON is specified in the BEGINGRAPH statement or in an ODS GRAPHICS statement. In that case, subpixel rendering is ON for this scatter plot.

OFF

disables subpixel rendering for image output only for this scatter plot.

 

Sorry, but it is not designed the way you want.  You can enable it in general (generarlly a good thing) and disable it for a graph component that is expensive,

View solution in original post


All Replies
Solution
‎06-05-2017 06:06 AM
SAS Employee
Posts: 154

Re: How can I manage SUBPIXEL for different Template

AUTO

The system sets subpixel rendering OFF for this scatter plot, unless SUBPIXEL=ON is specified in the BEGINGRAPH statement or in an ODS GRAPHICS statement. In that case, subpixel rendering is ON for this scatter plot.

OFF

disables subpixel rendering for image output only for this scatter plot.

 

Sorry, but it is not designed the way you want.  You can enable it in general (generarlly a good thing) and disable it for a graph component that is expensive,

New Contributor
Posts: 2

Re: How can I manage SUBPIXEL for different Template

Thank you very much. So, if we use subpixel option with inline gtl plot statement then we can only make it off from there, isn't it?

SAS Employee
Posts: 154

Re: How can I manage SUBPIXEL for different Template

Right.  Off or Auto.

☑ This topic is solved.

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

Discussion stats
  • 3 replies
  • 148 views
  • 4 likes
  • 2 in conversation