Announcement

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

  • Edit graph with code

    I've got 20 .gph files and I need to change the titles on all of them. Can I do that with Stata commands, or do I need to do it "by hand" in the Graph Editor GUI?

  • #2
    You can do it with commands. You can specify the files name through the options.

    Could you give an example, so that I can give more useful suggestion.

    Comment


    • #3
      I assume you cannot easily recreate the graphs with the title option. Here is one way, once the graph has already been created:
      Code:
      sysuse auto,clear
      scatter price mpg, title(old title)
      graph save "Graph" , replace
      clear*
      graph use Graph
      gr_edit .title.text = {"New Title"}

      Comment


      • #4
        Thanks Scott Merryman! I had not heard of gr_edit. Is it still undocumented? It was as of this 2014 discussion:
        https://www.statalist.org/forums/for..._edit-helpfile
        Last edited by paulvonhippel; 02 Dec 2019, 12:37.

        Comment


        • #5
          Yes, it appears to still be undocumented. To get the correct syntax, I first had to use the Graph Editor & Graph Recorder.

          Comment

          Working...
          X