Announcement

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

  • Fixing X-axis on dotplot

    Hi,

    I am having some trouble with the X-axis on my dot plot.

    The Y-axis is the different patients in my study, and the X-axis is Days after surgery.
    I am using my dot plot to show that blood samples from patients in my study were taken at different time points and that the time of the blood samples differed between patients.
    Also I am showing that the number of blood samples for each patient varies.

    Code:
    dotplot patient, over(Days), if Days<2000
    Click image for larger version

Name:	stat.jpg
Views:	1
Size:	57.6 KB
ID:	1608883



    My problem is that the X-axis becomes a mess because of all the days listed. How is this changed, så perhaps only every 30 day is listed?
    And perhaps it's possible to make the distance between each tic the same? I don't know if this will make the plot worse, but it is worth trying.

    Hope you can help

    Best Regards

  • #2
    Code:
    dotplot patient if Days<2000, over(Days) incr(30)

    Comment


    • #3
      If patient is an identifier, then it presumably doesn't have intrinsic meaning and you might be better advised to sort patients according to anything that has more meaning, such as the median time.

      The point of dotplot is to show frequency distribution in pointillist form; nothing stops you using it as a scatter plot command, but it seems to be choosing axis labels a little arbitrarily, and a scatter plot wouldn't do that.

      I would consider using a square root or logarithmic scale for time, subject to whether readers can be expected to feel comfortable with that and how far you want to explain it..

      Comment


      • #4
        Originally posted by Andrew Musau View Post
        Code:
        dotplot patient if Days<2000, over(Days) incr(30)
        Thank you Andrew.
        With the incr(30) I get this plot. Is it possible to have the days on the X-axis be numbers more like 30-60-90-120 or something like that?
        Click image for larger version

Name:	Graph.jpg
Views:	1
Size:	43.9 KB
ID:	1610354


        Comment


        • #5
          Code:
          dotplot patient if Days<2000, over(Days) incr(30) xlab(0(30)720)

          Comment

          Working...
          X