Stata graphs: Spirals and text wrapping
In this guide, learn how to make spirals and wrap text around them in Stata:
So why are we making spirals in Stata especially when they have a limited application? First, purely as a programming challenge in Stata. Second, this guide leads into some visualization replications like the DuBois challenge (#DuBoisChallenge on Twitter), and will be therefore referenced in later posts.
The guide also touches upon string functions for text formatting, and the use of modulus for generating the angles.
Preamble
Like other guides, a basic knowledge of Stata is assumed. In order to make the graphs exactly as they are shown here, several additional item are required:
- Install the cleanplots theme for a clean look for your figures (more on themes in Guide 2):
net install cleanplots, from("https://tdmize.github.io/data/cleanplots")set scheme cleanplots, perm
- Install Ben Jann’s colorpalette package (more on colors in Guide 2 and in the Color guide)
net install palettes, replace from("https://raw.githubusercontent.com/benjann/palettes/master/")
net install colrspace, replace from("https://raw.githubusercontent.com/benjann/colrspace/master/")
- Set default graph font to Arial Narrow (see…