Announcement

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

  • #16
    clear
    sysuse pop2000, clear
    replace maletotal = maletotal/1e+6
    tw (bar maletotal agegrp in 1/5) (scatteri 10.55 2 10.55 3, recast(line) ///
    lw(medthick) mc(none) lc(black) lp(solid)) (scatteri 10.55 2 10.55 3, ///
    recast(dropline) base(10.52) lw(medthick) mc(none) lc(black) lp(solid)), ///
    ysc(r(., 11)) scheme(s1mono) leg(off) text(10.55 2.5 "p<.001", place(n))

    Now, it can be displayed, but the font is ugly.

    Comment


    • #17

      Below is snapshot of the created graph in which the statistical significance level is placed.
      Click image for larger version

Name:	sanpshot.JPG
Views:	1
Size:	85.5 KB
ID:	1714623

      Comment


      • #18
        Originally posted by smith Jason View Post

        Now, it can be displayed, but the font is ugly.
        See

        Code:
        help graph text

        Comment


        • #19
          Originally posted by Andrew Musau View Post

          See

          Code:
          help graph text
          I used the method you showed at this thread to place brackets on the bar charts by group created by twoway comamnd. However, it doesn't work. Could you please help me?
          Last edited by smith Jason; 23 May 2023, 22:15.

          Comment


          • #20
            Originally posted by smith Jason View Post

            I used the method you showed at this thread to place brackets on the bar charts by group created by twoway comamnd. However, it doesn't work. Could you please help me?
            What does "it doesn't work" mean here? Do you not show the result in #17?

            Comment


            • #21
              Originally posted by Andrew Musau View Post

              What does "it doesn't work" mean here? Do you not show the result in #17?
              Thanks for your response. In fact, I have difficulties in addressing this issue at https://www.statalist.org/forums/for...roups-in-stata in which I want to add brackets in your graph here to the bar charts created by twoway command.

              Comment


              • #22
                Hi everyone, I have a similar question - what if I want to use scatteri, but I want the line to appear "outside the plot", i.e below the x-axis ideally. For example, if I use the yline command for a point that is outside the specified y axis, it will plot the line outside of the graph (below the x-axis). However, yline will not work for what I want because I want my line to span only part of the x-axis. The problem with using scatteri however, is that if I choose to put the line with coordinates outside my specified plot region, it just enlarges the plot region. To be clear, the attached figure is what I am trying to replicate. In this figure, the curly braces and the text below the x-axis has been added on powerpoint - I want to achieve this in Stata. It is ok if I can't get curly braces, I can use square brackets instead. But as explained, when I try to achieve this through scatteri (by giving a y coordinate of, say -0.1), it enlarges the plot region so that the bracket does not come below the x-axis like I want it to.
                Click image for larger version

Name:	Screenshot 2024-11-21 at 5.09.39 PM.png
Views:	1
Size:	174.8 KB
ID:	1768151

                Comment


                • #23
                  Akash Bhatt , this might help: https://www.statalist.org/forums/for...raphs-in-stata

                  Comment

                  Working...
                  X