Announcement

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

  • combineplot available on SSC

    Thanks as always to Kit Baum, a new program combineplot is available from SSC, to be installed as usual using ssc inst combineplot.

    As usual, the help file gives the documentation, so the better thing for me to do is to give some examples so you can see whether you care.

    Code:
    sysuse auto, clear
    set scheme s1color
    
    combineplot mpg price weight headroom: dotplot @y, over(rep78)
    combineplot price mpg headroom-gear, combine(imargin(small)): histogram @y, freq yla(, ang(h))
    The flavour is that combineplot instructs some graph command to draw a series of graphs using different variables, saving each graph so that they can be combined in one image. Many users will know how to set up a loop, save a graph each time, and then put the graphs together. That remains the best technique for anything at all complicated, but shortcuts are possible when we're doing the same thing over and over again. The graphs could just be exploratory or they could come close to something suitable for a presentation or a paper.






    Those are univariate examples. We can do bivariate examples too

    Code:
    combineplot (mpg price) (rep78 foreign), sequence(a b c d)  seqopts(caption(, color(red))): graph box @y, over(@x)
    There are some little options in there to label each graph, and in this case, to tweak the presentation of those labels away from the default.



    Comments from Alfonso Sánchez-Peñalver and Dirk Enzmann in an earlier thread stimulated development of the program.

  • #2
    Thanks Nick, I'm sure I will find many more uses, but this is very convenient to do exploratory scatter plots of the response variable with the explanatory variables, to analyze if the relationship may be linear or not. It took me a minute to understand the @y and @x syntax, but figured it out. I ran this to test and it works like a charm
    Code:
    combineplot price (mpg-length): scatter @y @x
    I can also add the fitted line like I asked by simply combining two graphs like I normally would
    Code:
    combineplot price (mpg-length): scatter @y @x || lfit @y @x
    Thanks again!
    Alfonso Sanchez-Penalver

    Comment


    • #3
      Those graphs don't show up using the latest Safari or Firefox on the Mac. Anybody else using a Mac not seeing Nick's plots?

      Comment


      • #4
        I can't see them either (on Mac Firefox)

        Comment


        • #5
          I don't think that there are any graphs attached or imbedded into any post in this thread (topic).

          Comment


          • #6
            Oh. OK. I was thrown off by little blue boxes with question marks in them in the Mac Safari browser where it seemed graphs might go. I went to the sandbox and assured myself I could post a .PNG file without issues.

            Comment


            • #7
              This is to note that I included three graphs as .png and that I can see them.

              Comment


              • #8
                Hmm . . . I cannot. I've attached a screenshot to show what I can see of the post. No attachment and no imbedded image. Click image for larger version

Name:	combineplot_screenshot.png
Views:	1
Size:	129.5 KB
ID:	3106

                Comment


                • #9
                  Here is another attempt, this time just to show the box plots.

                  Attached Files

                  Comment


                  • #10
                    This time the other graphs:



                    Attached Files

                    Comment


                    • #11
                      I used the same method as yesterday: insert .png as attachment. This time what I see are not only the graphs, but a little box naming the files. I can't see that in respect of yesterday's posting. I can't explain the difference, but can those people who couldn't see the graphs now see them?

                      Comment


                      • #12
                        Yes. I can see those graphs and the "Attached Files" boxes at the bottom of the two posts.

                        Comment


                        • #13
                          Yes, I can see the plots in the newer posts.

                          Comment


                          • #14
                            Good. I am chasing up this problem with the forum administrators so that it can be fixed or we can give advice warning what (not) to do.

                            Comment


                            • #15
                              Yes, can see the graphs in the newer posts

                              Comment

                              Working...
                              X