Hi,
I am using sgscatter:
PROC SGSCATTER DATA=test;
TITLE "Matriz del trazado de dispersión";
MATRIX compras_3m compras_12m tipo_cliente1 rango_edad
/ GROUP=res_campa ;
RUN;
I get some graph x-y combining compras_3m compras_12m tipo_cliente1 rango_edad and the color and symbol of the dot
is res_campa. The var res_campa is my target var in the model. It has 2 possible values 1 and 0.
I want to change the color and the symbol of res_campa values in my graph of sgscatter, how can I do it??
The default color are very similar and the graph is using by defalut the same symbol (o) for both values.
I want ti change color and symbol of dots depending on res_campa values.
If the solution is using sgplot or similar I don't mind to use another proc...
Any advice will be greatfull appreciatted.
Thanks in advance.
Juan
Hi,
First port of call on any graph related question:
http://blogs.sas.com/content/graphicallyspeaking/
There is examples for virtually every graph imaginable in sgplot/gtl etc.
Hi,
First port of call on any graph related question:
http://blogs.sas.com/content/graphicallyspeaking/
There is examples for virtually every graph imaginable in sgplot/gtl etc.
Thanks, this is my solution:
data Attrs;
length Value 8. MarkerColor $20 Markersymbol $20;
ID = "res_campa";
Value = 0; MarkerColor = "DarkBlue "; Markersymbol = "circlefilled "; output;
Value = 1; MarkerColor = "DarkRed "; Markersymbol = "star ";output;
run;
PROC SGSCATTER DATA=test DATTRMAP=Attrs;
TITLE "Matriz del trazado de dispersión";
MATRIX compras_3m compras_12m tipo_cliente1 rango_edad
/
GROUP=res_campa ATTRID=res_campa ;
RUN;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.