Announcement

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

  • Options for individual curves in stcurve?

    Is there a way to edit color, line pattern etc for individual curves when using -stcurve-?
    For example,
    Code:
    stcurve, cif at1( x1=0 x2=0 ) at2( x1=1 x2=0 ) lwidth(thick)
    would change the line width only for the first curve.

  • #2
    Hi Andrzej,

    Stata will accept as many arguments as there are lines/groups. If you supply a single argument, it will modify the first line only. If you have multiple lines, you can supply as many arguments as there are groups, for any appropriate suboptions. For example:
    Code:
    webuse hypoxia, clear
    stset dftime, failure(failtype==1)
    stcrreg ifp tumsize pelnode, compete(failtype==2)
    
    stcurve, cif at1(pelnode=0) at2(pelnode=1) lcolor(blue green) lpat(solid dash) lwidth(thick thin)
    I have two lines (for pelnode==0 and pelnode==1) so I can specify two arguments for each suboption.

    Comment


    • #3
      Thank you Matt,
      this indeed works. I haven't seen it documented in Stata manuals, and it's different from sts graph where options for each line are listed separately. For example:
      Code:
      sts graph, by(x) plot1opts(lcolor(blue) lwidth(medthick) lpattern(solid)) plot2opts(lcolor(red) lwidth(medthick) lpattern(solid))

      Comment


      • #4
        Code:
        help stylelists
        describe stylelists: colorstylelist, symbolstylelist, etc.

        Comment


        • #5
          Thanks Bjarte for the pointer to stylelists.

          Comment

          Working...
          X