How to customize Y axis label

Reply
Contributor
Posts: 30

How to customize Y axis label

I need to label y-axis with -5, 0, 20, 40 60 80 100 (or let -5 empty by doing offset?) when plot with numerical data from 0 - 100.  Is it possible?

Here is my code, this is not giving me the label I excepted because the -5 tick is not plotted.  Any suggestion?

axis1 label=(angle=90 font='swiss' h=11 "Proportion of Subjects (%)" )

      order=(0 to 100 by 20) minor=(number=2) offset=(0,0);

Thanks!

Anna

Super Contributor
Posts: 543

Re: How to customize Y axis label

Hi.

Assuming that this is part of a proc gplot?

then you could use something like this:

axis1 label=(angle=90 font='swiss' h=11 "Proportion of Subjects (%)" )

      order=(-5 to 0 by 5 0 to 100 by 20) minor=(number=2) offset=(0,0);

Good luck!

Anca.

Contributor
Posts: 30

Re: How to customize Y axis label

Posted in reply to AncaTilea

Hi Anca,

Thanks for your input.  It did not work out for my situation.  I finally used this approach.  Just to share.

axis1 label=(angle=90 font='swiss' h=11 "Proportion (%)" )

      order=(-5 to 100 by 5) major=(h=2) minor = none

      value=( h=9

         tick=1 justify=c ' -5' tick=2 justify=c '   0'

          tick=3 justify=c '' tick=4 justify=c ''

          tick=5 justify=c '' tick=6 justify=c '  20'

          tick=7 justify=c '' tick=8 justify=c ''

          tick=9 justify=c '' tick=10 justify=c '  40'

          tick=11 justify=c '' tick=12 justify=c ''

          tick=13 justify=c '' tick=14 justify=c '  60'

          tick=15 justify=c '' tick=16 justify=c ''

          tick=17 justify=c '' tick=18 justify=c '  80'

          tick=19 justify=c '' tick=20 justify=c ''

          tick=21 justify=c '' tick=22 justify=c ' 100');

Anna

Ask a Question
Discussion stats
  • 2 replies
  • 200 views
  • 3 likes
  • 2 in conversation