DATA Step, Macro, Functions and more

markerattrs= option not working

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 17
Accepted Solution

markerattrs= option not working

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;

 

 


Accepted Solutions
Solution
‎10-25-2017 11:27 AM
SAS Super FREQ
Posts: 508

Re: markerattrs= option not working

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


All Replies
SAS Super FREQ
Posts: 508

Re: markerattrs= option not working

Try adding the MARKERS option to that SERIES statement.

Occasional Contributor
Posts: 17

Re: markerattrs= option not working

Posted in reply to WarrenKuhfeld

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

SAS Super FREQ
Posts: 508

Re: markerattrs= option not working

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

Occasional Contributor
Posts: 17

Re: markerattrs= option not working

[ Edited ]
Posted in reply to WarrenKuhfeld

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

Solution
‎10-25-2017 11:27 AM
SAS Super FREQ
Posts: 508

Re: markerattrs= option not working

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.

Occasional Contributor
Posts: 17

Re: markerattrs= option not working

Posted in reply to WarrenKuhfeld

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.

 

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 213 views
  • 2 likes
  • 2 in conversation