Data visualization with SAS programming

SGPLOT Colorresonse model not showing

Reply
Occasional Contributor
Posts: 16

SGPLOT Colorresonse model not showing

Capture.PNG

proc sgplot data=glimpred;
scatter x=predMu y=BW / coloresponse=studentMu  markerattrs=(symbol=CircleFilled size=7) filledoutlinedmarkers colormodel=(CX3288BD CX99D594 CXE6F598 CXFEE08B CXFC8D59 CXD53E4F) ;
ellipse x=predMu y=BW / lineattrs=(COLOR=grey PATTERN=2 THICKNESS=0.5);
lineparm x=0 y=0 slope=1 / LINEATTRS=(COLOR=black PATTERN=2 THICKNESS=1);
title 'Observed vs Predicted - Total';
run;
Super User
Posts: 11,558

Re: SGPLOT Colorresonse model not showing

You should provide some description of what you are attempting and possibly data in form of a dataset to test code against.

 

Colorresponse works with the Gradlegend statement so you need to add Gradlegend.

 

Or perhaps you want your StuendMu variable to be a group variable.

 

Occasional Contributor
Posts: 16

Re: SGPLOT Colorresonse model not showing

No data necessary - you can see that the markers are colored according to the color response model but that the legend is not. This code used to work fine in the SAS studio version that comes with SAS base, but it does not work anymore on the SAS server solution unfortunately. 

Super User
Posts: 20,224

Re: SGPLOT Colorresonse model not showing


MJ1985 wrote:

 This code used to work fine in the SAS studio version that comes with SAS base, but it does not work anymore on the SAS server solution unfortunately. 


Are they the same version of SAS, exactly? 

What is the default style in each version?

 


MJ1985 wrote:

No data necessary - you can see that the markers are colored according to the color response model but that the legend is not.

 

Well, yes, but you posted a graph and a title and no question so we have no idea of what you actually want. Data helps to replicate your issue, but you're right, that's not necessary. 

SAS Super FREQ
Posts: 945

Re: SGPLOT Colorresonse model not showing

Try this and see if you get what you want:

 

proc sgplot data=glimpred;
scatter x=predMu y=BW / coloresponse=studentMu  markerattrs=(symbol=CircleFilled size=7) filledoutlinedmarkers colormodel=(CX3288BD CX99D594 CXE6F598 CXFEE08B CXFC8D59 CXD53E4F) name="BW" ;
ellipse x=predMu y=BW / lineattrs=(COLOR=grey PATTERN=2 THICKNESS=0.5);
lineparm x=0 y=0 slope=1 / LINEATTRS=(COLOR=black PATTERN=2 THICKNESS=1);
gradlegend "BW";
title 'Observed vs Predicted - Total';
run;
Occasional Contributor
Posts: 16

Re: SGPLOT Colorresonse model not showing

Hi, tried and not working. I am now almost thinking of what Rick has told that It may be a configuration thing - the imagemap is working in SAS base as is the colorresponse (that is why i first used the code) but it not working in sas studio 3.6

SAS Super FREQ
Posts: 3,795

Re: SGPLOT Colorresonse model not showing

> This code used to work fine in the SAS studio version that comes with SAS base, but it does not work anymore on the SAS server solution unfortunately. 

 

The OP has used this same sentence for two posts about "graphs not working." It would be helpful to know the previous and current configurations. Can anyone explain what is meant by this sentence? 

Ask a Question
Discussion stats
  • 6 replies
  • 109 views
  • 2 likes
  • 5 in conversation