help arcplotarcplot v1.2 (GitHub)

arcplot

: A Stata package for arc plots.

The command is based on the following guide on Medium: Arc plots.

Syntax

arcplot var [if] [in], from(var) to(var)
[ gap(num) arcpoints(num) palette(str) alpha(num) format(str) lcolor(str) lwidth(num)
labgap(str) labangle(str) labsize(num) labcolor(str) labpos(str)
vallabgap(str) vallabangle(str) vallabsize(num) vallabcolor(str) vallabpos(str) valcondition(num)
xsize(num) ysize(num) title(str) subtitle(str) note(str) scheme(str) name(str) ]

arcplot var The command requires a numeric variable that contains the values that need to be plotted.

from(str) to(str) These are the source and destination variables.

gap(num) Gap between the horizontal bars. Default value is 0.03 or 3% of value total.

arcpoints(num) Number of arc sample points. Higher value equals smoother arcs. Default value is 50.

alpha(num) Transparency of the arcs. The default value is 50 for 50%.

palette(str) Color name is any named scheme defined in the colorpalette package. Default is CET C1.

lcolor(str) The outline color of the area fill. Default is black.

lwidth(num) The outline width of the area fill. Default is none.

labsize(str) The size of the category labels. The default value is 2.

labcolor(str) The color of the category labels. The default value is black.

labangle(str) The angle of the category labels. The default value is 0 for horizontal.

labgap(str) The gap of the category labels. The default value is 0.5.

labpos(str) The position of the category labels. The default value is labpos(6).

valcondition(num) The condition to label the values is >= num. The default value is valcond(0).

vallabsize(str) The size of the value labels. The default value is 1.2.

vallabcolor(str) The color of the value labels. The default value is black.

vallabangle(str) The angle of the value labels. The default value is 90 for 90 degrees.

vallabgap(str) The gap of the value labels from the horizontal bars. The default value is 2.

vallabpos(str) The position of the category labels. The default value is vallabpos(12).

title, subtitle, note These are standard twoway graph options.

xsize(value), ysize(value) These are standard twoway graph options for changing the dimensions of the graphs.

scheme(string) Load the custom scheme. Above options can be used to fine tune individual elements.

name(string) Assign a name to the graph.

Dependencies

arcplot requires palettes package (Jann 2018, 2022):

ssc install palettes, replace
ssc install colrspace, replace

and gtools package:

ssc install gtools, replace

Even if you have these installed, it is highly recommended to check for their updates:
ado update, update

Examples

Check GitHub for examples.

Version history

- 1.2 : Major speed improvement by flattening the code.
- 1.1 : Various bug fixes. Improvements to label controls. Gtools added for faster reshaping.
- 1.0 : First version.

Package details

Version : arcplot v1.2
This release : 16 Feb 2023
First release: 22 Jun 2022
Repository : GitHub
Keywords : Stata, graph, arc plot
License : MIT

Author : Asjad Naqvi
E-mail : asjadnaqvi@gmail.com
Twitter : @AsjadNaqvi

Feedback

Please submit bugs, errors, feature requests on GitHub by opening a new issue.

References

Jann, B. (2018). Color palettes for Stata graphics. The Stata Journal 18(4): 765-785.

Jann, B. (2022). Color palettes for Stata graphics: an update. University of Bern Social Sciences Working Papers No. 43.

Caceres, M. (2022). Gtools website.

Other visualization packages

alluvial, circlebar, spider, treemap, circlepack, sankey, treecluster, sunburst
marimekko, bimap, joyplot, streamplot, delaunay, clipgeo, schemepack