BookmarkSubscribeRSS Feed
sassygrl
Calcite | Level 5
I am using the following code:

goptions reset=all;
proc gplot data=pred;
plot sales*date=_type_ /
haxis = '1JAN07'd to '1JUL10'd by qtr
href = '15Dec07'd '15Dec08'd '15Dec09'd chref=cyan;
where _type_ in ('ACTUAL','FORECAST');
symbol1 v=star i=none;
symbol2 v=circle i=join;
format date MONYY7.;
run; quit;

When the graph is produced, both 'ACTUAL' and 'FORECAST' series are represented by stars, and there are no connecting lines. 'ACTUAL' is black and 'FORECAST' is red. Essentially, the SYMBOL2 statement is completely ignored. (No matter how I specify symbol1, symbol2 is a copy of it, just in red.)

I have tried changing the placement of the symbol statements, i.e., before the proc gplot statement, to no avail.

Any ideas? Thanks!
2 REPLIES 2
Doc_Duke
Rhodochrosite | Level 12
You need to specify the color on the symbol statement. Otherwise, the _type_ with go through all the colors available to SYMBOL1 before going on to SYMBOL2. It's documented (9.1.3), though not as prominently as one might want:

"Note: The nth generated SYMBOL definition is not necessarily the same as the nth SYMBOL statement. Plot requests of the form y-variable*x-variable=n assign the SYMBOL definition that is designated by n to the plot that is produced by y-variable*x-variable. For more information, see About Plot Requests that Assign a SYMBOL Definition."

Doc Muhlbaier
Duke
sassygrl
Calcite | Level 5
Hey, it worked! I knew it had to be something incredibly simple. Thanks!!!

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1333 views
  • 0 likes
  • 2 in conversation