Announcement

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

  • How do I format the x axis of a graph matrix?

    Hello!
    I created a matrix and displayed it in a singe graph matrix. All varialbes have different scales: fist is a Date (mothly), second ranges form 100 to 140, other ranges from 0 to 10 (not in picture). How can I format the axis so that the numbers don't overlap? My preferred solution would be to indicate 2 or 3 values that are further away from the edges.


  • #2
    You are giving us just a corner and it may be that you are pushing hard on the limits of legibility any way. But the extra option

    Code:
     
    , xla(, ang(v))
    may improve things so far as you are concerned. Consider also crossplot (SSC)

    http://www.statalist.org/forums/foru...ailable-on-ssc

    and also combineplot (SSC)

    http://www.statalist.org/forums/foru...ailable-on-ssc

    Comment


    • #3
      Thanks for the fast response Nick.
      I'm sorry for the lack of quality in my frist post. I've checked your links but think the half m atrix is the best way to present an overview of the 36 graphs.
      I attached the full graph using your improvements. As you can see the problem of overlapping persists, I also tried a 45 degree angle with the same result.
      Click image for larger version

Name:	testv.png
Views:	1
Size:	139.9 KB
ID:	1328284

      Comment


      • #4
        I can't make extra suggestions that don't otherwise reduce legibility!

        Comment


        • #5
          You can add some space between the individual graphs. It is difficult to make concrete suggestions if you don't show us your code. See section 12 in the FAQ for advice on how to ask questions on Statalist.

          Comment


          • #6
            Thank you for your suggestions.
            I'm using Stata 13.1 on Windows 7
            this is my code
            Code:
            clear
            import excel Collection.xlsx, clear firstrow
            tsset Month, format(%tm)
            graph matrix  Month var1 var2 var3 var4 var5 var6 var7 var8, half xla(, ang(90))
            I'd like the numbers of the x-axis not to overlap. My preferred solution would be that numbers further away from the edges are indicanted but I'm open for other solutions.

            Comment


            • #7
              Horst, please review the FAQ. Your example is not reproducible because we don't have your data.

              Below is a reproducible example with a solution. You can add the plotregion() option.
              Code:
              sysuse lifeexp, clear
              graph matrix popgrowth-safewater, half xla(, ang(90)) plotregion(margin(medium))
              Last edited by Friedrich Huebler; 29 Feb 2016, 08:00.

              Comment


              • #8
                Thank you for your help, plotregion() did the trick.

                Comment

                Working...
                X