Announcement

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

  • Interflex graph region white

    Hi, does anybody know if there is a way to change the background colour from light blue to white with interflex?
    Code:
    syuse auto, clear 
    
    interflex price mpg rep, xlab(X)
    I tried adding "graphregion(color(white))" but it says it is not allowed


  • #2
    Code:
    graphregion(fcolor(white) ilcolor(white) lcolor(white))

    Comment


    • #3
      Sorry but there seems no graphregion option in interflex.
      Code:
         syntax varlist(numeric) [if] [in] [aw fw pw] [, ///      type(string) ///
             vce(string) ///
             CLuster(varname) ///
             REPS(integer 50) ///
             FE(varlist) ///
             Nbins(integer 3) ///
             CUToffs(numlist ascending) ///
             BW(real 0) ///
             seed(integer 12345678) ///
             grid(integer 20) ///
             neval(integer 50) ///
             TItle(string) ///
             XRange(numlist ascending) ///
             YRange(numlist ascending) ///
             XDistr(string) ///
             YLABel(string) ///
             DLABel(string) ///
             XLABel(string) ///
             SAVing(string) ///
             ]

      Comment


      • #4
        Set the scheme to any scheme with a background white colour before you call this command (which is from SSC).

        Code:
        set scheme s1color
        should help.

        Comment


        • #5
          thank you!

          Comment


          • #6
            And is there any way to change the color of the confidence intervals? they are very dark gray but I would like to make them lighter gray and change the color of the 0 line to red. I tried the usual commands to do this in graphs in stata but none of them seem to be supported by interflex.

            Thank you!

            Comment


            • #7
              Cross-posted at https://stats.stackexchange.com/ques...itted-by-stata

              Otherwise it's the same answer as before from Chen Samulsion This command doesn't offer scope to pass through options not listed in the syntax. So, clone the code and then change it by adding the options you want against the graph command you want to use.

              Comment


              • #8
                thank you Nick. What do you mean by "clone the code"?

                Comment


                • #9
                  The word is pretty much the same in Catalan or Spanish.

                  Comment


                  • #10
                    Yes indeed. However I do not understand what you mean in this context, how does one clone a code?

                    Comment


                    • #11
                      Copy the code from one file to another, change the program name and the file name, and change the code within to add your desired options.

                      Comment


                      • #12
                        Nick's method is suggesting you:
                        1) find interflex.ado in you PLUS directory. i.e. PLUS/i/, then make a copy of it and rename it as interflex2.ado;
                        2) open the interflex2.ado using Notepad in Windows, and modify three place at least,
                        2.1) change "program interflex, rclass" to "program interflex2, rclass"
                        2.2) add a new option in syntax, it is fcolor(string) here, so you will get
                        Code:
                        program interflex2, rclass
                        version 12
                        
                           syntax varlist(numeric)  [if] [in] [aw fw pw] [, ///
                             type(string) ///
                             vce(string) ///
                             CLuster(varname) ///
                             REPS(integer 50) ///
                             FE(varlist) ///
                             Nbins(integer 3) ///
                             CUToffs(numlist ascending) ///
                             BW(real 0) ///
                             seed(integer 12345678) ///
                             grid(integer 20) ///
                             neval(integer 50) ///
                             TItle(string) ///
                             XRange(numlist ascending) ///
                             YRange(numlist ascending) ///
                             XDistr(string) ///
                             YLABel(string) ///
                             DLABel(string) ///
                             XLABel(string) ///
                             Fcolor(string) ///
                             SAVing(string) ///
                             ]
                        and 2.3) is last but most important modification, to modify twoway command in your ado file, you can search "twoway" in it and in the second twoway sentence
                        Code:
                                 else {
                                    twoway (rarea CI_u CI_l xlevel, astyle(ci) fcolor(`fcolor')) ///
                                      (line marg xlevel, lstyle(p1)) ///
                                      (`Xdis1') ///
                                      (rcap bin_CI_u bin_CI_l x0 if bin_se!=0, lcolor(red)) ///
                                      (scatter bin_marg x0 if bin_se!=0, mcolor(red) ms(O)) ///
                                      (scatter bin_marg x0 if bin_se==0, mcolor(blue) ms(Sh)) ///
                                      , yline(0, lcolor(gs14) lwidth(1.2)) ///
                                      text(`lpos' `xlow' "L", color(gs10) size(*1.5)) ///
                                      text(`lpos' `xmid' "M", color(gs10) size(*1.5)) ///
                                      text(`lpos' `xhigh' "H", color(gs10) size(*1.5)) ///
                                      xtitle("Moderator: `xlabel'") ///
                                      ytitle("Marginal Effect of `dlabel' on `ylabel'") ///
                                      ylabel(#6,ang(h) nogrid) xlabel(#5) legend(off) ///
                                      xsc(r(`xrange')) ysc(r(`yrange')) title("`title'")
                                    }
                                 }
                        Then close the file and run interflex2.ado in Stata
                        Code:
                        sysuse auto, clear
                        interflex2 price mpg rep, xlab(X) fcolor(gs15)

                        Comment

                        Working...
                        X