I trying to produce a twoway line graph that connects each point with a straight line. I'm getting a graph with stairstep even though I haven't specified this option and I've tried using the connect option. How do I get a straight line between each point?
Array
I'm using the following command:
twoway line count2 day
An example of my data
input int record_id float(count count2 day) str6 date
1 1 1 1 "3-Jul"
2 1 2 1 "3-Jul"
3 1 3 1 "3-Jul"
4 1 4 1 "3-Jul"
5 1 5 1 "3-Jul"
6 1 6 1 "3-Jul"
7 1 7 1 "3-Jul"
8 1 8 1 "3-Jul"
9 1 9 1 "3-Jul"
10 1 10 1 "3-Jul"
11 1 11 1 "3-Jul"
12 1 12 1 "3-Jul"
13 1 13 1 "3-Jul"
14 1 14 1 "3-Jul"
15 1 15 1 "3-Jul"
16 1 16 1 "3-Jul"
17 1 17 1 "3-Jul"
18 1 18 1 "3-Jul"
19 1 19 1 "3-Jul"
20 1 20 1 "3-Jul"
21 1 21 1 "3-Jul"
22 1 22 1 "3-Jul"
23 1 23 1 "3-Jul"
24 1 24 1 "3-Jul"
25 1 25 1 "3-Jul"
26 1 26 1 "3-Jul"
27 1 27 1 "3-Jul"
28 1 28 1 "3-Jul"
29 1 29 1 "3-Jul"
30 1 30 1 "3-Jul"
31 1 31 1 "3-Jul"
32 1 32 1 "3-Jul"
33 1 33 1 "3-Jul"
34 1 34 1 "3-Jul"
35 1 35 1 "3-Jul"
36 1 36 1 "3-Jul"
37 1 37 1 "3-Jul"
38 1 38 1 "3-Jul"
39 1 39 1 "3-Jul"
40 1 40 1 "3-Jul"
41 1 41 1 "3-Jul"
42 1 42 1 "3-Jul"
43 1 43 1 "3-Jul"
44 1 44 1 "3-Jul"
45 1 45 1 "3-Jul"
46 1 46 1 "3-Jul"
47 1 47 1 "3-Jul"
48 1 48 1 "3-Jul"
49 1 49 1 "3-Jul"
50 1 50 1 "3-Jul"
51 1 51 1 "3-Jul"
52 1 52 1 "3-Jul"
53 1 53 1 "3-Jul"
54 1 54 1 "3-Jul"
55 1 55 1 "3-Jul"
56 1 56 2 "4-Jul"
57 1 57 2 "4-Jul"
58 1 58 2 "4-Jul"
59 1 59 2 "4-Jul"
60 1 60 2 "4-Jul"
61 1 61 2 "4-Jul"
62 1 62 2 "4-Jul"
63 1 63 2 "4-Jul"
64 1 64 2 "4-Jul"
65 1 65 2 "4-Jul"
66 1 66 2 "4-Jul"
67 1 67 2 "4-Jul"
68 1 68 2 "4-Jul"
69 1 69 2 "4-Jul"
70 1 70 2 "4-Jul"
71 1 71 2 "4-Jul"
72 1 72 2 "4-Jul"
73 1 73 2 "4-Jul"
74 1 74 2 "4-Jul"
75 1 75 2 "4-Jul"
76 1 76 2 "4-Jul"
77 1 77 2 "4-Jul"
78 1 78 2 "4-Jul"
79 1 79 2 "4-Jul"
80 1 80 2 "4-Jul"
81 1 81 2 "4-Jul"
82 1 82 2 "4-Jul"
83 1 83 2 "4-Jul"
84 1 84 2 "4-Jul"
85 1 85 2 "4-Jul"
86 1 86 2 "4-Jul"
87 1 87 2 "4-Jul"
88 1 88 2 "4-Jul"
89 1 89 2 "4-Jul"
90 1 90 2 "4-Jul"
91 1 91 2 "4-Jul"
92 1 92 2 "4-Jul"
93 1 93 2 "4-Jul"
94 1 94 2 "4-Jul"
95 1 95 2 "4-Jul"
96 1 96 2 "4-Jul"
97 1 97 2 "4-Jul"
98 1 98 2 "4-Jul"
99 1 99 2 "4-Jul"
100 1 100 2 "4-Jul"
end
label values day day_lbl
label def day_lbl 1 "3-Jul", modify
label def day_lbl 2 "4-Jul", modify
[/CODE]
Stephen
Related Posts with twoway line - point connection
How to attribute a numeric value to a string variable through a loopHi all, In my Dataset I have 12241 unique values, every individual is represented by the variable c…
multilevel logistic regression: question about random slopeHello, I have models of multilevel logistic regression with random intercept and random slope. In th…
mixed effect modelsHi, I'm trying to fit data from 10 different subjects to a nonlinear mixed effect model. The model …
r(3261) error messageHi, I'm using the stns command on STATA and I keep getting this error code "3261 non/class structu…
How to show the ENDOG results using OUTREG2 from INSTRUMENTAL REGRESSION?Hello Stata users, Does anybody know the command in OUTREG2 to show the ENDOG command results (i.e.…
Subscribe to:
Post Comments (Atom)
0 Response to twoway line - point connection
Post a Comment