Hello,
I have a basic understanding of graphs and have been making changes via the Graph editor.
Following is the starting command for a series of graphs I have been using:
However, periodically I need to update these graphs and was seeking advice regarding
how I would perform the following tasks via code:
1) drop the leading 0 (currently edited via range/delta) from the data below
2) select the number of ticks on the x axis
3) Include only odd or even values for the x axis and rename these (e.g 1 becomes 2011)
Any assistance is appreciated
I have a basic understanding of graphs and have been making changes via the Graph editor.
Following is the starting command for a series of graphs I have been using:
Code:
twoway (line Made Year2)(line Ended Year2), ytitle(Number of persons)
how I would perform the following tasks via code:
1) drop the leading 0 (currently edited via range/delta) from the data below
2) select the number of ticks on the x axis
3) Include only odd or even values for the x axis and rename these (e.g 1 becomes 2011)
Any assistance is appreciated
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str4 Year byte(Made Ended) long Year2 "11_1" 54 60 1 "11_2" 58 39 2 "12_1" 45 43 3 "12_2" 70 72 4 "13_1" 54 48 5 "13_2" 56 29 6 "14_1" 38 41 7 "14_2" 63 45 8 "15_1" 60 42 9 "15_2" 62 33 10 end label values Year2 Year2 label def Year2 1 "11_1", modify label def Year2 2 "11_2", modify label def Year2 3 "12_1", modify label def Year2 4 "12_2", modify label def Year2 5 "13_1", modify label def Year2 6 "13_2", modify label def Year2 7 "14_1", modify label def Year2 8 "14_2", modify label def Year2 9 "15_1", modify label def Year2 10 "15_2", modify
Comment