Announcement

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

  • When y-axis values are incorrectly derived

    Hello,

    I'm sorry to ask you a little thing. But I really don't know the solution

    I'm using STATA version 15

    I want to make a graph using STATA.

    The variable is between 100,000 and 2 million.

    But when I draw a graph using the code below, what comes out on the y-axis is from 0 to 20.

    Can I know what the problem is?

    Here I attach the code I used.

    Please Help me

    Thank you.


    Code:
    recast long v1 // year
    encode v2, gen(v22)
    encode v3, gen(v33)
    encode v4, gen(v44)
    
    drop v2 v3 v4
    
    
    
    graph twoway (con v22 v1, lpattern(solid) lcolor(gs0) ///
            msymbol(O) mcolor(gs0)) ///
            (connected v33 v1, lpattern(solid) lcolor(gs0) ///
            msymbol(Oh) mcolor(gs0)) /// 
            (connected v44 v1, lpattern(shortdash) lcolor(gs0) ///
            msymbol(T) mcolor(gs0))




    Attached Files

  • #2
    The values that you see are value labels, not values of the variables. If you have a string variable with numbers, use destring not encode. See

    Code:
    help destring

    Comment

    Working...
    X