Announcement

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

  • need equal spaces for unequal time points in x-axis of graph

    I'm trying to create a line graph showing trends in religiosity across five waves of survey data (2, 3, 4, 5, and 7). As you can see I'm not using wave 6 of the survey, but when I put in the code below it creates a large conspicuous space on the x-axis in between 5 and 7 where 6 should be. I need the graph to have equal spaces across the 5 points on the x-axis.

    graph twoway line religiosity wave, xlabel(2 3 4 5 7)

    All help is appreciated! thanks in advance.

  • #2
    As you want this you need a version of the variable something like

    Code:
    clonevar xshow = wave 
    replace xshow = 6 if wave == 7 
    
    line religiosity xshow, xlabel(2 3 4 5 6 "7")
    You won't be surprised if a reviewer notices and advises otherwise.

    Comment

    Working...
    X