Announcement

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

  • graphs: options

    Hello,

    is there an option I can use to change colour and type of writing for my graphs?
    For exmaple I need Stata to create all descriptions in my graphs in Times New Roman 12.

    Thanks in advance
    Lisa

  • #2
    Assuming you are working form a *.do file. To change the font:

    Code:
    graph set window fontface "Times New Roman"
    In order to get back to original font style:

    Code:
    graph set window fontface default
    The size of texts can be used with small/medium/v.small/large etc. options and color of texts can be changed within graph options.
    Last edited by Roman Mostazir; 20 Nov 2015, 08:55. Reason: Added color related answer.
    Roman

    Comment


    • #3
      thank you very much.
      It is no problem to change the writing, but I am not sure how to change the color of the title in black in my case:

      Code:
      graph twoway (line A B DATE, clcolor(red blue)), title("Date")  xlabel(1 "2000" 2 "2002" 3 "2003" ) graphregion(fcolor(white))  xtitle("Date ytitle("Deposit")
      Thanks in advance

      Comment


      • #4
        The development version of the brewscheme package (https://wbuchanan.github.io/brewscheme/brewtheme) has new features that would allow you to create a scheme file with standardized font sizes. I've not yet gotten around to putting together a helpfile for brewtheme, but you would use that prior to creating the scheme file (adjusts graph specific aesthetic properties).

        Comment


        • #5
          Originally posted by lisa bäcker View Post
          It is no problem to change the writing, but I am not sure how to change the color of the title in black in my case:
          This is all explained in the help files. If you start with help graph and click all the way through to help colorstyle you will have looked at the help files below.
          Code:
          help graph
          help graph_twoway
          help line
          help twoway_options
          help title_options
          help textbox_options
          help colorstyle
          Here is an example of a graph with a red title.
          Code:
          sysuse uslifeexp, clear
          line le year, title("Red text", color(red))
          Last edited by Friedrich Huebler; 20 Nov 2015, 11:47.

          Comment


          • #6
            thank you very much !

            Comment


            • #7
              lisa bäcker Additionally, I am currently getting some additional features added to brewscheme that make it easier for users to add named color styles to Stata - including a utility that installs the colors from the XKCD color name survey from 2010 in Stata. You should also be able to pass an RGB string like:

              Code:
              sysuse uslifeexp, clear
              line le year, title("Red text", color("255 0 0"))
              To get purely red colored text.

              Comment

              Working...
              X