BookmarkSubscribeRSS Feed
xxformat_com
Barite | Level 11

Hi,

 

Is there a trick to add a tick at both ends of the discrete axis beside using annotations?

 

proc sgplot data=sashelp.class;
    vbarbasic age / response=height stat=mean;
    xaxis tickstyle=inbetween;
run;    

question.JPG

3 REPLIES 3
ballardw
Super User

I am not quite sure what you mean by "add a tick at both ends".

If mean adding more tick mark values, such as 10 and 17 then a VALUES list on the XAXIS statement would work:

 

proc sgplot data=sashelp.class;
    vbarbasic age / response=height stat=mean;
    xaxis tickstyle=inbetween values=(10 to 17 by 1);
run;  
xxformat_com
Barite | Level 11

I've tried to represent them on my first graph with some yellow.

 

I see many graphs which are added the ticks before the first bar and after the last bar.

 

Here is another example:

tick.png

ballardw
Super User

Please add some description about where these "tick marks" are supposed to appear.

 

This image doesn't show any tick marks at all, much less "both ends", and would be created in SAS with a Group variable for the levels showing the colors and the Groupdisplay=cluster option.

 


@xxformat_com wrote:

I've tried to represent them on my first graph with some yellow.

 

I see many graphs which are added the ticks before the first bar and after the last bar.

 

Here is another example:

tick.png


 

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 3 replies
  • 180 views
  • 0 likes
  • 2 in conversation