Announcement

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

  • Reset graph scheme

    Something is awry with my graphics and I don't know how to restore default settings.

    I want to use the
    Code:
    lean1
    scheme. I ensured it is available

    Code:
    . graph query, schemes
    
    Available schemes are
    
        s2color        see help scheme_s2color
        s2mono         see help scheme_s2mono
        s2manual       see help scheme_s2manual
        s2gmanual      see help scheme_s2gmanual
        s2gcolor       see help scheme_s2gcolor
        s1color        see help scheme_s1color
        s1mono         see help scheme_s1mono
        s1rcolor       see help scheme_s1rcolor
        s1manual       see help scheme_s1manual
        sj             see help scheme_sj
        economist      see help scheme_economist
        s2color8       see help scheme_s2color8
        lean1          see help scheme_lean1
        lean2          see help scheme_lean2
    and set as the default scheme

    Code:
     query graph
    -------------------------------------------------------------------------------------------------------------------
        Graphics settings
            set graphics        on
            set scheme          lean1
            set printcolor      automatic  may be automatic, asis, gs1, gs2, gs3
            set copycolor       automatic  may be automatic, asis, gs1, gs2, gs3
    but when I make a plot

    Code:
    sysuse auto, clear
    tw scatter price mpg, by(foreign)
    it comes out looking like a cross between lean1 and lean2, with a different font:

    Click image for larger version

Name:	Graph.jpg
Views:	1
Size:	83.6 KB
ID:	1359141


    I get the same result even after I reset graphics using

    Code:
    . set_defaults graphics
    -> set graphics on
    -> set scheme s2color
    -> set printcolor automatic
    -> set copycolor automatic
    (preferences reset)
    and run

    Code:
    sysuse auto, clear
    tw scatter price mpg, by(foreign) scheme(lean1)
    What could be causing this and how can I reset to factory defaults?

  • #2
    Not completely/directly related, but why not just pass the scheme name to the scheme parameter of graph commands? Somewhat along those lines, why not use brewschemeto generate a customized scheme file where you have more control over the aesthetics?

    Comment


    • #3
      in corroboration of the substance behind the original poster's question, I have noticed that when changing schemes from the graph gui menu ->edit->change schemes, there are times when not all elements of the graph are updated with the new scheme characteristics. i have not made a systematic investigation into this observation, and would accept that it may be an expected finding from the complexities of the graphics engine and scheme definitions. however, this problem also afflicts my attempts to redraw graphics using schemes created with the brewschemes package, so i'm not sure that approach will address the OP's concerns.

      Comment


      • #4
        What font were you expecting to see? Since schemes don't control the font, you may have changed your window font at some point. You can check this using
        Code:
        graph set
        You can reset the font to default using
        Code:
        graph set window fontface default
        I'm not very familiar with the lean schemes so I'm not sure what "cross between lean1 and lean2" means. Have you tried uninstalling and reinstalling the schemes?

        Comment


        • #5
          Thanks for the responses. wbuchanan, in the end snippet I directly pass the scheme to the graph command, to no avail. Developing my own scheme is all well and good - but first I want to hit reset.

          Chis, I was expecting to see the default Stata font. Uninstalling and reinstalling didn't cure the problem.

          Comment


          • #6
            If you need to clear previous settings out of memory you can use the
            Code:
            discard
            command. Just know that it is a fairly brute force approach to things, but will definitely clear out any settings stored and load them again once the command is called a second time.

            Comment


            • #7
              Not even `discard` works! This is very bizarre. I simply cannot get rid of those gridlines unless I explicitly declare `nogrid`

              Comment

              Working...
              X