A South African number is ten digits with its trunk 0, and the area code is the first three: 011 Johannesburg, 021 Cape Town, 031 Durban, 041 Gqeberha, 051 Bloemfontein. The plan is the old four provinces': 01x is the Transvaal, 02x the west of the Cape, 03x Natal, 04x the east of the Cape, 05x the Free State. This map draws each code on the local municipalities whose towns dial it, coloured by that digit.
How to read the map. Each patch is a code and the numeral on it is what you dial there, with the town the code is known by beneath. The colour is the digit after the 0, which is the plan's memory of the four provinces of before 1994: 1 is the Transvaal — Gauteng, Limpopo, Mpumalanga and North West; 2 the Western Cape and Namaqualand; 3 Natal; 4 the Eastern Cape with the Garden Route; 5 the Free State with Kimberley and Upington. Johannesburg carries 010 and 011 together, the second laid over the first in 2010; a municipality whose towns split between two codes carries both.
Where the lines come from. ICASA assigns each code to a set of towns and publishes no boundary. The code each local municipality dials is taken from Wikidata, where some 1,300 towns carry theirs and each sits in its municipality: a municipality takes the code most of its towns dial, and one with no town in Wikidata takes the nearest municipality's, which the build counts. So the lines are municipal, and a code that in the plan ends at a town's outskirts ends here at its municipality's edge. The boundaries are the Municipal Demarcation Board's.
Sources. Codes: Wikipedia, Telephone numbers in South Africa — the area codes by old province and the towns each serves, after ICASA's plan. Code per town: Wikidata, local dialling code (P473) and municipality (P131) of South African towns. Geometry: Municipal Demarcation Board boundaries as the common operational dataset (OCHA, CC BY 3.0 IGO), via geoBoundaries ADM3; dissolved by code and by region.