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-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 919 views
  • 0 likes
  • 3 in conversation