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

4 REPLIES 4
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


 

 

GraphGuy
Meteorite | Level 14

Why would you want any ticks on that axis at all?

What purpose do they serve?

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 4 replies
  • 532 views
  • 0 likes
  • 3 in conversation