help bumplinebumpline v1.21 (GitHub)

bumpline

: A Stata package for bump area or ribbon plots.

Syntax

bumpline y x [if] [in], by(varname)
[ top(num) select(any|last) smooth(num) palette(str) labcond(str) offset(num)
lwidth(str) labsize(str) xlabsize(str) ylabsize(str) xlabangle(str) wrap(num)
msymbol(str) msize(str) mcolor(str) mlcolor(str) mlwidth(str) mlabsize(str) *
]

The options are described as follows:

bumpline y x, by(group) The command requires a numeric y variable and a numeric x variable. The x variable is usually a time variable.
The by() variable defines the groupings.

top(num) The number of rows to show in the graph. The default option is top(50). All other values are dropped.

select(any|last) The option sel(any) selects top() for all x-axis categories. This is the default and also shows by() categories moving in and out
of the top(). The option sel(last) tracks the path of the top() for the last x-axis category.

smooth(num) The smoothing parameter that ranges from 1-8. The default value is smooth(4). A value of 1 shows straight lines,
while a value of 8 shows almost vertical jumps.

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

offset(num) Extends the x-axis range to accommodate labels. The default value is offset(15) for 15% of xmax-xmin.

lwidth(str) The line width of the area stroke. The default is lw(0.8).

wrap(num) Wrap the labels after a number of characters. For example, wrap(50) will wrap labels every 50 characters.

labsize(str) Size of the by() category labels. Default value is labs(2.2).

mlabsize(str) Size of the by() category labels that end in the middle. Default value is mlabs(1.6).

xlabsize(str) Size of the x-axis labels. Default value is xlabs(2.5).

ylabsize(str) Size of the y-axis labels. Default value is ylabs(2.5).

xlabangle(str) Angle of the x-axis labels. Default is xlaba(0) for horizontal.

msymbol(str) Symbol of the markers. Default is msym(2.5).

msize(str) Size of markers. Default is ms(2).

mcolor(str) Color of markers. Default is the line color.

mlwidth(str) Size of marker outline width. Default is mlwid(medium).

mlcolor(str) Color of marker outline width. Default is the line color.

* All other standard twoway options.

Dependencies

The palette package (Jann 2018, 2022) is required:

ssc install palettes, replace
ssc install colrspace, replace

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

Examples

See GitHub.

Package details

Version : bumpline v1.21
This release : 11 Jun 2024
First release: 10 Apr 2023
Repository : GitHub
Keywords : Stata, graph, bump chart, rank 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.

Citation guidelines

Suggested citation guidlines for this package:

Naqvi, A. (2024). Stata package "bumpline" version 1.21. Release date 11 June 2024. https://github.com/asjadnaqvi/stata-bumpline.

@software

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.

Other visualization packages

arcplot, alluvial, bimap, bumparea, bumpline, circlebar, circlepack, clipgeo, delaunay, joyplot,
marimekko, polarspike, sankey, schemepack, spider, streamplot, sunburst, treecluster, treemap, waffle

or visit GitHub for detailed documentation and examples.