I have a panel data, 10 regions (name), 1-12 months (months), and two other statistical variables
However, the data of the two variables are quite different. If the same Y-axis is used, the smaller change trend will not be obvious. Can you use the xtline command to generate two Y-axis,

just like as follows:
twoway (line var1 months,sort yaxis(1)) (line var2 months,sort yaxis(2)
Thank you for your help, thank you very much
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long name float months int var1 double var2 1 720 107 7.49 1 721 62 4.5 1 722 42 4.12 1 723 41 4.54 1 724 38 4.27 1 725 38 4.53 1 726 45 4.07 1 727 38 3.92 1 728 31 3.71 1 729 60 5.45 1 730 50 4.65 1 731 51 4.88 2 720 105 7.31 2 721 60 4.49 2 722 42 4.12 2 723 41 4.71 2 724 35 4.35 2 725 39 4.58 2 726 43 4.11 2 727 35 3.91 2 728 26 3.7 2 729 57 5.45 2 730 48 4.71 2 731 52 5.03 3 720 104 7.33 3 721 65 4.73 3 722 45 4.2 3 723 42 4.57 3 724 36 4.38 3 725 39 4.55 3 726 46 4.22 3 727 38 4.08 3 728 33 3.94 3 729 58 5.49 3 730 48 4.71 3 731 53 5.1 4 720 108 7.49 4 721 60 4.38 4 722 42 3.94 4 723 39 4.31 4 724 36 4.13 4 725 34 4.31 4 726 42 4 4 727 35 3.64 4 728 28 3.65 4 729 54 4.97 4 730 45 4.32 4 731 56 4.95 5 720 105 7.63 5 721 61 4.64 5 722 41 4.13 5 723 33 4.32 5 724 35 4.4 5 725 33 4.57 5 726 37 4.13 5 727 28 3.76 5 728 27 3.87 5 729 54 5.28 5 730 45 4.76 5 731 50 5.06 6 720 109 7.66 6 721 61 4.53 6 722 44 4.09 6 723 39 4.49 6 724 37 4.34 6 725 37 4.48 6 726 42 4.06 6 727 37 3.94 6 728 31 3.85 6 729 56 5.25 6 730 45 4.5 6 731 52 5.12 7 720 100 7.5 7 721 62 4.59 7 722 44 4.33 7 723 40 4.84 7 724 34 4.48 7 725 35 4.79 7 726 38 4.13 7 727 28 3.93 7 728 25 3.97 7 729 53 5.53 7 730 49 4.75 7 731 56 5.22 8 720 119 8.03 8 721 62 4.54 8 722 45 4.34 8 723 43 4.66 8 724 38 4.5 8 725 40 4.72 8 726 48 4.31 8 727 36 3.9 8 728 32 3.85 8 729 59 5.37 8 730 49 4.68 8 731 59 5.31 9 720 95 7.14 9 721 61 4.61 9 722 43 4.4 9 723 40 4.86 end format %tm months label values name lb2 label def lb2 1 "a", modify label def lb2 2 "b", modify label def lb2 3 "c", modify label def lb2 4 "d", modify label def lb2 5 "e", modify label def lb2 6 "f", modify label def lb2 7 "g", modify label def lb2 8 "h", modify label def lb2 9 "i", modify
just like as follows:
twoway (line var1 months,sort yaxis(1)) (line var2 months,sort yaxis(2)
Thank you for your help, thank you very much
Comment