*! version 1.1.0 29may2026

Title

qqheat -- MATLAB-style heatmap/contour for QQ results

Syntax

qqheat [using filename] [, options]

value(varname) value to plot (default coef)

variable(name) filter by variable (for mqqr)

band(name) filter by band (for wavelet results)

colormap(name) jet | parula | viridis | plasma | hot | cool | redblue (default jet)

levels(#) number of color steps (default 30)

sigmark overlay markers where p < alpha

alpha(#) significance threshold for sigmark (default 0.05)

title(string) plot title

subtitle(string) plot subtitle

xtitle(string) x-axis title

ytitle(string) y-axis title

ztitle(string) z-axis (color) title

save(filename) export the graph

name(name) Stata graph window name

scheme(name) Stata scheme

aspect(#) aspect ratio (default 1)

replace overwrite when saving

Description

qqheat produces a MATLAB-style heatmap of QQ-regression results using
twoway contour with continuous colormaps. Symmetric
diverging maps are auto-centred at zero when the data crosses zero.

Available colormaps

jet — classic MATLAB rainbow (blue → cyan → yellow → red)

parula — MATLAB's modern default (blue → green → yellow)

viridis — perceptually uniform (purple → green → yellow)

plasma — perceptually uniform (purple → red → yellow)

hot — black → red → yellow → white

cool — cyan → magenta

redblue — diverging blue-white-red (ColorBrewer RdBu)

redgreen — diverging red-yellow-green (ColorBrewer RdYlGn)

redwhitegreen — diverging red-white-green (clean, no yellow midpoint)

Dependencies

None beyond base Stata. qqheat draws the heatmap with the built-in
twoway contour (available since Stata 12) and generates
all colormaps internally — you do not need heatplot,
colorpalette, palettes, colrspace, grstyle or any
other add-on. The same is true of the 3D commands qqsurf and
qqsurf3d, which use only base twoway. (The single
external dependency in the whole package is krls from SSC, needed
only by qqkrls.)

Example

. qqr sp500 oil, saving(qq.dta) replace

. qqheat using qq.dta, value(coef) colormap(jet) sigmark

. qqheat using qq.dta, value(t) colormap(redblue)

Author

Merwan Roudane. merwanroudane920@gmail.com

See also

qqr, qqsurf, qqsurf3d, qqtable,
qqr_package, twoway_contour