# Plot out Tunisian tourism data over several years, using data from the Tunisian Ministry of Tourism # Max Vilimpoc, 2020 # Code: # https://matplotlib.org/3.1.0/gallery/subplots_axes_and_figures/shared_axis_demo.html # Data: # http://www.tourisme.gov.tn/fr/realisations-et-perspectives/tourisme-en-chiffres/statistiques-2011.html # http://www.tourisme.gov.tn/fr/realisations-et-perspectives/tourisme-en-chiffres/statistiques-2012.html # http://www.tourisme.gov.tn/fr/realisations-et-perspectives/tourisme-en-chiffres/statistiques-2013.html # http://www.tourisme.gov.tn/fr/realisations-et-perspectives/tourisme-en-chiffres/statistiques-2014.html # http://www.tourisme.gov.tn/fr/realisations-et-perspectives/tourisme-en-chiffres/statistiques-2015.html # http://www.tourisme.gov.tn/fr/realisations-et-perspectives/tourisme-en-chiffres/statistiques-2016.html # https://www.leconomistemaghrebin.com/2017/12/27/recettes-touristiques-hausse/ # https://www.leconomistemaghrebin.com/2018/01/04/tourisme-tunisie-2017-relance/ # https://www.realites.com.tn/2018/07/tourisme-les-chiffres-explosent-par-rapport-a-2017/ # https://www.realites.com.tn/2019/02/chiffres-du-tourisme-2018-decryptage-et-contradictions/ # https://www.veilleinfotourisme.fr/international/pays-de-n-a-z/tunisie/rene-trabelsi-la-tunisie-a-accueilli-9-millions-30-mille-touristes-jusqu-au-20-decembre-2019 # https://lapresse.tn/40807/la-tunisie-a-accueilli-9-millions-30-mille-touristes-au-20-decembre-2019/ import matplotlib.pyplot as plt import numpy as np years = [2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019] visitors = [6761906, 7048999, 6901406, 6902749, 4781896, 5950464, 6268582, 6068593, 5359309, 5724021, 6700000, 8299137, 9030000] nights = [37360681, 38112352, 34623504, 35565104, 21236067, 29955916, 29980174, 29107239, 16177575, 17880034, 21251000, 27070302, 28800000] revenues = [np.nan, np.nan, 3471.9, 3522.5, 2364.5, 3172.9, 3229.4, 3575.6, 2354.6, 2322.9, 2696.5, 4093, 5350] # TND, millions facecolor = '#F7FAFC' fig, axes = plt.subplots(nrows=3, ncols=1) fig.patch.set_facecolor(facecolor) fig.tight_layout() ax1 = plt.subplot(311) # Rows, Cols, Plot Index ax1.set_xlabel('Revenues (Tunisian Dinars, billions)', labelpad=10) plt.plot(years, [r / 1000 for r in revenues], 'g.-') plt.setp(ax1.get_xticklabels(), visible=False) ax2 = plt.subplot(312, sharex=ax1) ax2.set_xlabel('Hotel Room Stays (millions)', labelpad=10) plt.plot(years, [n / 1000000 for n in nights], 'r.-') plt.setp(ax2.get_xticklabels(), visible=False) # make these tick labels invisible ax3 = plt.subplot(313, sharex=ax1) # sharey=ax1 ax3.set_xlabel('Visitors (millions)', labelpad=10) plt.plot(years, [v / 1000000 for v in visitors], 'b.-') ax3.set_xticks(years) plt.setp(ax3.get_xticklabels(), fontsize=8) list(map(lambda ax: ax.grid(linestyle='--'), [ax1, ax2, ax3])) plt.show()