Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • advice re y axis on Km graph

    Hello all
    I plotted a KM graph


    Code:
    sts graph, by(procedure) ylabel(0.99(0.001)1) scheme(white_jet) plot1(color(orange_red)) plot2(color(blue)) legend(order(1 "old treatment" 2 "New treatment"))
    Which produced the graph with the following scale, which is what I requested.

    Questions
    1. Rather than showing 0.99 consecutively, how can I tell stata to graphically present the y axis scale as 0.991, 0.992 ?
    2. Should I convert this to percent?

    P.S I've tried this: - added -ytick-
    Code:
    sts graph, by(procedure) ylabel(0.99(0.001)1) ytick(0.991(0.001)1) scheme(white_jet) plot1(color(orange_red)) plot2(color(blue)) legend(order(1 "old treatment" 2 "New treatment"))
    Still produced the same with 2 decimal places.
    Click image for larger version

Name:	Screenshot 2024-01-03 at 14.59.08.png
Views:	1
Size:	179.1 KB
ID:	1738753


  • #2
    Code:
    ylabel(0.99(0.001)1, format(%4.3f))

    Comment


    • #3
      Andrew Musau Thank you so much it addressed my problem

      Call me silly, but I would like my y axis to be converted to percentage rather than have 0.998 but have 99.8% - as I'm so sure some people will complain and want a % rather than 3 dp figures

      I tried this:

      Code:
      sts graph, by(procedure) ylabel(0.990 "99.0" 0.991 "99.1" 0.992 "99.2" 0.993 "99.3" 0.994 "99.4" 0.995 "99.5" 0.996 "99.6" 0.997 "99.7" 0.998 "99.8" 0.999 "99.9" 1.00 "100" ytick(99.0(0.1)100) scheme(white_jet) plot1(color(orange_red)) plot2(color(blue)) legend(order(1 "old treatment" 2 "New treatment"))
      I got this graph -_- Any idea what I'm doing wrong pls?

      Click image for larger version

Name:	Screenshot 2024-01-03 at 16.03.24.png
Views:	1
Size:	239.0 KB
ID:	1738760


      Comment


      • #4
        Code:
        sts graph, by(procedure) per(100) ylabel(99(.1)100, format(%3.1f)) ...

        Comment

        Working...
        X