I want to create a line graph/bar chart which looks at the consumption of 3 main fertilizers- UREA, TSP and MOP over a 3 year period across two seasons. I want to include all the three fertilizers in the same graph.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int Sur_yr str10 Cult_idHhidVdsid byte(Season Name_mat) str1 Unit_mat double Qty_mat 2012 "BBG12A0005" 1 22 "3" 5 2012 "BBG12A0007" 4 22 "3" 14 2012 "BBG12A0007" 1 25 "3" 5 2012 "BBG12A0007" 4 25 "3" 5 2012 "BBG12A0007" 4 22 "3" 10 2012 "BBG12A0007" 4 22 "3" 10 2012 "BBG12A0007" 4 22 "3" 14 2012 "BBG12A0007" 1 26 "3" 5 2012 "BBG12A0007" 1 22 "3" 2 2012 "BBG12A0007" 1 25 "3" 21 2012 "BBG12A0007" 1 26 "3" 20 2012 "BBG12A0007" 1 22 "3" 10 2012 "BBG12A0008" 1 26 "3" 12 2012 "BBG12A0008" 1 22 "3" 10 2012 "BBG12A0008" 4 25 "3" 10 2012 "BBG12A0008" 1 22 "3" 8 2012 "BBG12A0008" 4 22 "3" 10 2012 "BBG12A0008" 4 22 "3" 10 2012 "BBG12A0008" 1 25 "3" 7 2012 "BBG12A0008" 4 22 "3" 24 2012 "BBG12A0008" 1 25 "3" 14 2012 "BBG12A0008" 1 22 "3" 15 2012 "BBG12A0008" 1 22 "3" 7 2012 "BBG12A0008" 1 25 "3" 24 2012 "BBG12A0008" 4 26 "3" 8 2012 "BBG12A0008" 4 22 "3" 8 2012 "BBG12A0008" 4 22 "3" 12 2012 "BBG12A0008" 1 22 "3" 12 2012 "BBG12A0008" 1 22 "3" 15 2012 "BBG12A0010" 4 22 "3" 15 2012 "BBG12A0010" 1 22 "3" 15 2012 "BBG12A0010" 4 22 "3" 8 2012 "BBG12A0011" 1 25 "3" 25 2012 "BBG12A0011" 4 26 "3" 15 2012 "BBG12A0011" 1 26 "3" 20 2012 "BBG12A0011" 4 22 "3" 8 2012 "BBG12A0011" 4 22 "3" 10 2012 "BBG12A0013" 1 22 "3" 8 2012 "BBG12A0013" 1 25 "3" 15 2012 "BBG12A0013" 4 25 "3" 5 2012 "BBG12A0013" 4 26 "3" 5 2012 "BBG12A0013" 1 22 "3" 5 2012 "BBG12A0015" 1 26 "3" 10 2012 "BBG12A0015" 1 22 "3" 10 2012 "BBG12A0015" 4 22 "3" 10 2012 "BBG12A0015" 4 26 "3" 7 2012 "BBG12A0015" 1 22 "3" 8 2012 "BBG12A0015" 4 26 "3" 4 2012 "BBG12A0015" 1 25 "3" 7 2012 "BBG12A0015" 1 22 "3" 12 2012 "BBG12A0015" 1 25 "3" 10 2012 "BBG12A0016" 4 22 "3" 5 2012 "BBG12A0019" 1 25 "3" 3 2012 "BBG12A0019" 1 26 "3" 2 2012 "BBG12A0019" 1 22 "3" 3 2012 "BBG12A0019" 4 26 "3" 5 2012 "BBG12A0019" 4 22 "3" 8 end label values Season Seasonname label def Seasonname 1 "RABI", modify label def Seasonname 4 "KHARIF", modify label values Name_mat inputnames label def inputnames 22 "UREA", modify label def inputnames 25 "TSP", modify label def inputnames 26 "MP", modify
Thanks!
Enakshi
0 Response to Create a two-way line graph/bar chart
Post a Comment