I am using catplot 3.0.1 by Nick Cox (thanks!) on Stata 19.5. I am failing to convince catplot to include missing categories (i.e. system missing and extended missing values), even with the "missing" option.

I think the cause might be an early markout that effectively disregards missings before hbar has an opportunity to include them.
I can devise a workaround (like a temporary mvencode), but is this a bug in catplot or working-as-intended? If the latter, a note in the helpfile might be good.
Code:
sysuse auto, clear graph hbar, over(rep78) missing title(hbar) name(hbar) nodraw catplot, over(rep78) missing title(catplot) name(catplot) nodraw graph combine hbar catplot
I think the cause might be an early markout that effectively disregards missings before hbar has an opportunity to include them.
Code:
. sysuse auto, clear
(1978 automobile data)
. marksample touse
. fre `touse'
__000002
-------------------------------------------------------
| Freq. Percent Valid Cum.
----------+--------------------------------------------
Valid 1 | 74 100.00 100.00 100.00
-------------------------------------------------------
. markout `touse' rep78, strok
. fre `touse'
__000002
-----------------------------------------------------------
| Freq. Percent Valid Cum.
--------------+--------------------------------------------
Valid 0 | 5 6.76 6.76 6.76
1 | 69 93.24 93.24 100.00
Total | 74 100.00 100.00
-----------------------------------------------------------

Comment