BookmarkSubscribeRSS Feed
Vic3
Obsidian | Level 7

How to re-scale color response legend in SGPLOT? This is what I'm getting:

Vic3_0-1637106532597.png

The "solid" values are in the range of 0 to 1, yet the procedure generates color scale from 0 to 300, such that variation on the graph is invisible (i.e. all dots are green). I made a number of these graphs for different data sets, and the legend changes, but the range is always 100-500 times wider than needed.

scatter x=ntod2c y=ntod1c / colorresponse=ntos2w
		markerattrs=(symbol=CircleFilled size=9)
		colormodel=(CX99D594 CXFEE08B CXFC8D59 V000FFFF); 
		gradlegend / title='Solid, mg' titleattrs=(color=black family=arial size=10);
		xaxis min=0 valueattrs=(color=black size=10pt); yaxis min=0 valueattrs=(color=black size=10pt);
	lineparm x=0 y=0 slope=1;
	xaxis label="Liquid 2, mg/L";
	yaxis label="Liquid 1, mg/L"; 

 

Interestingly, I ran the same script few months ago and the legend optimized automatically. Now it's giving me trouble. 

1 REPLY 1
Ksharp
Super User
Can you post your real data to replicate your problem ?

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 534 views
  • 0 likes
  • 2 in conversation