Code:
     +----------------------------------------------------------------------------------------+
     | year                                                firm         sales         country |
     |----------------------------------------------------------------------------------------|
  1. | 2010   ZHONGHANG ELECTRONIC MEASURING INSTRUMENTS CO LTD    433.190944           China |
  2. | 2010                                         VERSATEL AG    288.621564         Germany |
  3. | 2010                                        BRILLIANT AG    13.4939952         Germany |
  4. | 2010                             ROYALE ENERGY FUNDS INC   23.01539744   United States |
  5. | 2010                            MOTRICITY, INCORPORATION   756.2029718   United States |
     +----------------------------------------------------------------------------------------+
I would like to have the following line plots together:
  • Proportion of firms that have sales < 100 if country == "United States" (scale left )
  • Average sales (scale right )
  • Average sales if country == "United States" (scale right)

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input int year str105 firm double sales str22 country
2010 "ZHONGHANG ELECTRONIC MEASURING INSTRUMENTS CO LTD"                   433.190944 "China"        
2010 "VERSATEL AG"                                                         288.621564 "Germany"      
2010 "BRILLIANT AG"                                                13.493995199999999 "Germany"      
2010 "ROYALE ENERGY FUNDS INC"                                            23.01539744 "United States"
2010 "MOTRICITY, INCORPORATION"                                          756.20297178 "United States"
2010 "SILVERLEAF RESORTS, INC."                                           42.30089024 "United States"
2011 "NANFANG ZHONGJIN ENVIRONMENT CO LTD"                                411.5881728 "China"        
2011 "HOLLYSYS AUTOMATION TECHNOLOGIES, LIMITED"                   455.03851327999996 "China"        
2011 "DR HOENLE AG"                                                    66.75547738791 "Germany"      
2011 "HYMER AG"                                                             261.49396 "Germany"      
2011 "ONVIA, INC."                                                        24.29359504 "United States"
2011 "ALTIMMUNE INC"                                                      61.25993844 "United States"
2012 "SHENZHEN TOPBAND COMPANY LIMITED"                            212.43562703999999 "China"        
2012 "QINGDAO ZHONGZI ZHONGCHENG GROUP CO LTD"                             311.453604 "China"        
2012 "SURTECO GROUP SE"                                               248.39538361324 "Germany"      
2012 "HEIDELBERGCEMENT AG"                                              11336.5660875 "Germany"      
2012 "INTICA SYSTEMS AG"                                               16.82341644856 "Germany"      
2012 "DSP GROUP, INC."                                             124.84096704000001 "United States"
2012 "DYNAVOX INCORPORATION"                                               4.08980647 "United States"
2013 "BEIJING ARITIME INTELLIGENT CONTROL COMPANY LIMITED"             315.8520795495 "China"        
2013 "ZHEJIANG NARADA POWER SOURCE COMPANY LIMITED"                      782.89902096 "China"        
2013 "SHANGHAI HUAYI GROUP CORP LTD"                                  641.30546030714 "China"        
2013 "WHIRLPOOL CHINA CO LTD"                                      1322.7587971199998 "China"        
2013 "PROGRESS-WERK OBERKIRCH AG"                                       188.444865625 "Germany"      
2013 "SYNERGETICS USA, INC."                                               91.5605152 "United States"
2013 "TEXAS INSTRUMENTS INCORPORATED"                                  47545.87836879 "United States"
2014 "GUANGDONG HONGTU TECHNOLOGY HOLDINGS CO LTD"                       489.58464285 "China"        
2014 "LEO GROUP CO LTD"                                               1463.2291417812 "China"        
2014 "TIANJIN CHASE SUN PHARMACEUTICAL COMPANY LIMITED"              2229.34650143714 "China"        
2014 "CENTROTHERM INTERNATIONAL AG"                                    79.35253798209 "Germany"      
2014 "E.ON SE"                                                       33174.3689012708 "Germany"      
2014 "ADEPT TECHNOLOGY, INC."                                               113.28268 "United States"
2015 "TIANJIN MOTIMO MEMBRANE TECHNOLOGY CO LTD"                     1040.14742787776 "China"        
2015 "PACIFIC ONLINE LIMITED"                                         343.05631223424 "China"        
2015 "KWEICHOW MOUTAI CO., LTD."                                     42174.2028683804 "China"        
2016 "WUS PRINTED CIRCUIT (KUNSHAN) COMPANY., LIMITED"               1152.27762323149 "China"        
2016 "JIANGSU PHOENIX PUBLISHING&MEDIA CORP LTD"                        3836.62838097 "China"        
2016 "HAISCO PHARMACEUTICAL GROUP CO LTD"                          2407.2290850701897 "China"        
2016 "CYTOTOOLS AG"                                                        18.1413103 "Germany"      
2016 "ADM HAMBURG AG"                                                     264.6070128 "Germany"      
2016 "K&S AG"                                                            4581.0722001 "Germany"      
2016 "CALLAWAY GOLF CO"                                                 1031.47666064 "United States"
2017 "BEIJING STRONG BIOTECHNOLOGIES INC"                              1156.835655162 "China"        
2017 "SHENZHEN INSTITUTE OF BUILDING RESEARCH CO LTD"                 635.84602184376 "China"        
2017 "CHONGQING IRON & STEEL COMPANY LIMITED"                         2769.0095278376 "China"        
2017 "NEXWAY AG"                                                        7.04493487973 "Germany"      
2017 "KERYX BIOPHARMACEUTICALS, INC."                                     554.2444554 "United States"
2017 "NOVAN INC"                                                    67.54282176000001 "United States"
2018 "ZHEJIANG NARADA POWER SOURCE COMPANY LIMITED"                1813.9451278658098 "China"        
2018 "BAOTAILONG NEW MATERIALS CO LTD"                                1278.4957997234 "China"        
2018 "HARBIN ELECTRIC CORPORATION JIAMUSI ELECTRIC MACHINE CO LTD" 477.85802041465996 "China"        
2018 "FORMYCON AG"                                                    280.94941925362 "Germany"      
2018 "EBIX, INC."                                                         1300.962376 "United States"
2018 "MOMENTA PHARMACEUTICALS, INC."                                       1087.04256 "United States"
end