Code
Source code of the scripts used in the book (presented in the same order as they appear in the text). The input data are available on the Resources page.
Part I: Representing data
Chapter 2: Magnitudes
- bar_chart.py
- bar_chart_with_style_variations.py
- paired_bar_chart.py
- stacked_bar_chart.py
- multiple_bar_chart.py
- horizontal_bar_chart.py
- packed_bubble_chart.py
Chapter 3: Proportions
- pie_chart.py
- pie_chart_side_legend.py
- pie_chart_exploded.py
- doughnut_chart.py
- semi_doughnut_chart.py
- waffle_chart.py
- waffle_chart_multiple.py
- hundred_percent_stacked_bar_chart.py
- hundred_percent_divergent_stacked_bar_chart.py
- one_level_tree_map.py
- two_level_tree_map.py
Chapter 4: One variable as a function of the other
Chapter 5: Frequency distributions
Chapter 6: Groups
Chapter 7: Relations
Chapter 8: Bivariate Data
- scatter_plot.py
- scatter_plot_with_regline.py
- scatter_plot_matrix.py
- scatter_plot_with_categories.py
- scatter_plot_with_categories_fancy_version.py
- scatter_plot_datasaurus_dozen.py
Chapter 9: Trivariate data
- scatter_bubble_plot.py
- scatter_bubble_plot_with_annotations.py
- heat_map.py
- heat_map_with_annotations.py
Chapter 10: Geospatial data
Part II: Representing processes
Chapter 11: Timelines
Chapter 12: Flowcharts
Chapter 13: Gantt charts
Chapter 14: PERT diagrams
Appendices
Appendix B: Matplotlib primer
- empty_figure.py
- add_axes_to_figure.py
- generate_figure_and_axes.py
- generate_insets.py
- title_and_subtitle.py
- change_background_colour.py
- depth_sorting.py
Appendix C: Colour
Appendix D: Geography and cartography notes
Dependencies
- Python 3.10.4
- matplotlib 3.8.0
- matplotlib extra
- mpl_ornaments 0.0.4
- numpy 1.22.3
- packed_bubbles
- pandas 1.4.2
- seaborn 0.13.0
- voting 0.1.3
Licence
© Francesco Bianconi 2024, under exclusive licence to Springer Nature Switzerland AG