BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Cingchih
Quartz | Level 8

Hi,

The marker format of curve labelled Taichung could not  run, please see attachment file. My software is SAS 9.4. 

 

Image 01.jpg

Here is the program:

proc import datafile= 'c:\sasabc\rain.xlsx'  out=testrain replace;
sheet='kkk';
run;

proc sgplot data=testrain;
series y=taipei_rain  x=month / legendlabel = 'Taipei' markers  lineattrs = (thickness = 2  color=tan  pattern=15);

series y=taichung_rain  x=month / LEGENDLABEL = 'Taichung'  markerattrs=(symbol=circle color=blue size=3) lineattrs = (thickness = 2);
/*The marker format of taichung could not be run. Please help solve. */

series y=kaohsiung_rain  x=month / LEGENDLABEL = 'Kaohsiung' markers lineattrs = (thickness = 2);
xaxis type=discrete grid; 
yaxis label='taiwan rain'  grid values= (0 to 1100 by 50);
run;

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenKuhfeld
Rhodochrosite | Level 12

Your first example specified markerattrs but not markers.  So I told you to add markers.  So instead, you changed markerattrs to markers, so I told you again to go back to your original code and add markers.  In your last one, you did not specify markerattrs.  Again, add Markers to your original code.  Don't change some other option.

View solution in original post

6 REPLIES 6
WarrenKuhfeld
Rhodochrosite | Level 12

Try adding the MARKERS option to that SERIES statement.

Cingchih
Quartz | Level 8

Hi,

I try to add the markers option, the question still exists.

I refer to the resource 'http://support.sas.com/documentation/cdl/en/grstatug/63302/HTML/default/viewer.htm#p0qap3adaorc06n19...'

, writing the code. However, the question (bugs ?) still exists.

 

Image 006.jpg

WarrenKuhfeld
Rhodochrosite | Level 12

You did not do what I said.  Add the Markers option to your original code, just like you had it in the other statements.

Cingchih
Quartz | Level 8

At present, I learn to write the proc sgplot code, including its statements and options, such as lineattrs and markerattrs. By way of web resource, I learn to change the format of line via lineattrs option. In addition, I can add the markers option to produce the marker at the data point of broken line chart. The sas code is to be as follows:

 

series y=taichung_rain x=month / LEGENDLABEL = 'Taichung' markers lineattrs = (thickness = 2);

 

I also find that I can change the marker format of broken line chart via the statement markerattrs.
(refenence: http://support.sas.com/documentation/cdl/en/grstatug/63302/HTML/default/viewer.htm#p0qap3adaorc06n19...)

 

However, I use the method but the program don't successfully run. Therefore, my question is why the markerattrs option cannot run.

Thank you for your reply

WarrenKuhfeld
Rhodochrosite | Level 12

Your first example specified markerattrs but not markers.  So I told you to add markers.  So instead, you changed markerattrs to markers, so I told you again to go back to your original code and add markers.  In your last one, you did not specify markerattrs.  Again, add Markers to your original code.  Don't change some other option.

Cingchih
Quartz | Level 8

The question has been solved; the correct answer is posted for all to see.

series y=taichung_rain  x=month / LEGENDLABEL = 'Taichung' markers markerattrs=(symbol=starfilled color=blue size=10   )  lineattrs = (thickness = 2);

Thank you so much for the speedy reply.

 

 

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!

How to Concatenate Values

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.

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
  • 6 replies
  • 2046 views
  • 2 likes
  • 2 in conversation