Announcement

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

  • Post-editing of graphs by code

    Dear all,

    Hope everything is going on well!

    I have produced a graph using a user-written function, which does not allow me to edit through the code.
    Therefore, I have to manually change the graph using "Graph Editor".
    Since there are many graphs to edit, I am wondering if there is a way to edit the graph after the graph has been produced.

    Thank you very much and I look forward to hearing from you!

    Best regards,
    Long


  • #2
    Perhaps reviewing the documentation for the Graph Recorder capabilities of Graph Editor - documented on pages 32-33 of the Stata Graphics Reference Manual PDF included with your Stata installation and accessible from Stata's Help menu - will point you in a helpful direction. I can't say for sure, because I've not used it, but the description sounds like it's designed - more or less - for what you want to do.

    Comment


    • #3
      I suggest to always keep the command in a do-file. If in need to provide editions, we can fiddle with the original command until getting the desired graph.

      That said, check - gr_edit - for that matter.
      Best regards,

      Marcos

      Comment


      • #4
        Thank you Marcos Almeida!

        I have checked the -gr_edit- and found it a bit confusing.

        I can directly apply it without installation as follows
        Code:
        sysuse auto, clear
        histogram mpg
        gr_edit plotregion1.plot1.style.editstyle area(shadestyle(color(gs7))) editcopy
        However, I cannot find it through "help gr_edit" or " findit gr_edit".
        It seems that there is no help file for me to follow but it is sort of a built-in program.
        Do you have insight into this? Thank you!

        Best regards,
        Long



        Comment


        • #5
          As far as I know, this is an undocumented command. That said, I still believe the best approach is keeping the do-files for further editions.
          Best regards,

          Marcos

          Comment


          • #6
            Also, there is an interesting strategy if you wish to get back the data used for the graph:

            Code:
            . help serset
            Best regards,

            Marcos

            Comment


            • #7
              Using the graph editor record the changes you make to the graph. Save the file. You can then open that file in a text editor and use the generated commands saved in that file as part of the dofile to automate the work.
              Cheers
              Kevan

              Comment


              • #8
                Is the thread at https://www.statalist.org/forums/for...o-graph-editor of any use?

                Comment

                Working...
                X