Keywords: US Trade Balance 1980 2012.svg en United States Balance of Trade 1980 “2012 based on February 2013 data Data Source US Census Bureau Foreign Trade Division http //www census gov/foreign-trade/statistics/historical/gands txt own 2013-02-16 Morn Code Made with Matplotlib <source lang python > /usr/bin/env python2 from pylab import rc 'xtick major' pad 8 from http //www census gov/foreign-trade/statistics/historical/gands txt d 3 508 4 195 3 370 4 210 6 022 4 664 2 939 2 604 0 250 0 091 2 254 -1 302 -5 443 1 900 -4 293 12 404 -6 082 -27 246 -29 763 -24 565 -19 407 -16 172 -24 156 -57 767 -109 072 -121 880 -138 538 -151 684 -114 566 -93 141 -80 864 -31 135 -39 212 -70 311 -98 493 -96 384 -104 065 -108 273 -166 140 -263 160 -376 749 -361 771 -417 432 -490 984 -605 357 -708 624 -753 288 -696 728 -698 338 -379 154 -494 737 -559 880 -540 362 start end 1980 2012 y range start end + 1 skip start - 1960 f figure figsize 7 5 4 5 ax f add_axes 13 18 8 75 plot y dskip 'r-' lw 1 5 plot y dskip 'bo' ms 5 mec 'b' grid ls '-' alpha 4 xlabel 'Year' ylabel 'Billions USD' title 'U S Trade Balance' text end -950 'Data Source US Census Bureau Foreign Trade Division' va 'bottom' ha 'right' size 10 axis start end -800 0 savefig US Trade Balance u u svg start end show </source> Balance of trade USA Trade Balance 1980-2012 Economy of the United States Trade Balance 1980-2012 Line charts USA Trade Balance 1980-2012 Created with Matplotlib Images with Python source code |