Hi all,
I'm trying to build a graph using different colors of markers, depending on treatments. I found this thread, with the same question that I had:
I tried what they suggested (creating an attribute map), but I always end up with multiple errors and still no graph.
The code I use is this one:
data myattrmap;
input ID $ value $ markercolor $;
datalines;
Trait Lisier pink
Trait Mineral lightblue
Trait Luzerne green ;
run;
PROC GPLOT data= indiv dattrmap=myattrmap;
Title "Representation de chaque donnee axe2*axe1";
plot y*x/annotate=indiv frame href=0 vref=0 attrid= "Trait";
symbol1 v=circle ;
run;
My attribute map seems to be created successfully, and the problem appears when I run the proc SG plot, with the following messages:
I am sorry as the error messages are in french, but I guess you can still see my mistakes pretty quickly.
Also, if you have another solution to reach my objective, i would gladly take it.
Thanks in advance,
Stéphanie
Attribute maps only work with SAS 9.4 and SGPLOT, SGSCATTER, and SGPANEL, they are not available for the ancient and dreadful gplot system. Drop gplot and move to a modern graphing system such as sgplot or GTL. If you need help on that, this is the best resource out there, with example code:
http://blogs.sas.com/content/graphicallyspeaking/
As for your error, its probable that you don't have graph available, are you perhaps using SAS University Edition? That doesn't have gplot for instance. If not, have you closed and restarted SAS, then run just that bit of code as you may have errors from before holding over. As the log goes from 1 to 70, we appear to be missing a big chunk of what could decipher this error.
Attribute maps only work with SAS 9.4 and SGPLOT, SGSCATTER, and SGPANEL, they are not available for the ancient and dreadful gplot system. Drop gplot and move to a modern graphing system such as sgplot or GTL. If you need help on that, this is the best resource out there, with example code:
http://blogs.sas.com/content/graphicallyspeaking/
As for your error, its probable that you don't have graph available, are you perhaps using SAS University Edition? That doesn't have gplot for instance. If not, have you closed and restarted SAS, then run just that bit of code as you may have errors from before holding over. As the log goes from 1 to 70, we appear to be missing a big chunk of what could decipher this error.
Thank you for your answer. I am indeed using Sas Studio through Sas OnDemand for Academics.
You pointed out my mistake: i was using the gplot instead of the sgplot procedure. So I changed the "plot" for the "scatter", with the good options.
It worked.
Thanks
http://support.sas.com/documentation/prod-p/grstat/9.4/en/PDF/odsbasicg.pdf
Let me also plug this free introductory book.
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.