# http://www.basicincome.org/bien/pdf/FiguresFAQ.pdf max_income = 10 ubi_value = 2 gross_income = linspace ( 0 , max_income , 11 ) net_income_no_tax = gross_income net_income_ubi_no_tax = ubi_value + gross_income # halper data net_income_ubi = ubi_value + gross_income * 0.5 # 50% flat tax model fig , ax = plt . subplots () fill_between ( gross_income , [ ubi_value ] * len ( gross_income ), color = 'green' , alpha = 0.2 ) fill_between ( gross_income , net_income_ubi_no_tax , net_income_ubi , color = 'yellow' , alpha = 0.2 ) plot ( gross_income , [ ubi_value ] * len ( gross_income ), ls = '--' , color = 'black' ) plot ( gross_income , net_income_no_tax , color = 'black' , alpha = 0.5 , label = 'no tax' ) plot ( gross_income , net_income_ubi_no_tax , ls = '--' , color = 'black' ) plot ( gross_income , net_income_ubi , linewidth = 2 , color = 'black' , label = 'after tax' ) legend ( loc = 'upper left' ) xlim (( 0 , max_income )) ax . spines [ 'right' ] . set_visible ( False ) ax . spines [ 'top' ] . set_visible ( False ) ax . xaxis . set_ticks_position ( 'bottom' ) ax . yaxis . set_ticks_position ( 'left' ) title ( 'Income distribution with basic income' ) ylabel ( 'Net Income' ) xlabel ( 'Gross Income' ) text ( 8 , 7 , 'TAX' , fontsize = 12 ) text ( max_income / 2 , 0.8 , 'BASIC INCOME' , fontsize = 12 , horizontalalignment = 'center' )