While this question sounds more meta as it is, I have a specific use case in mind.

Assume you want plots with nominal outcomes on the x-axis and you use the following (this includes Nicholas J. Cox tabplot, I use Stata 15) :

Code:
sysuse auto

gen gear = round(gear_ratio,1)

gen gear2 = gear+1


tabplot  rep78 gear , horizontal percent(gear) barwidth(.2) showval(offset(.1) mlabpos(6)) saving(1)
tabplot  rep78 gear2 , horizontal percent(gear2) barwidth(.2) showval(offset(.1) mlabpos(6)) saving(2)

gr combine 1.gph 2.gph ,  ycomm xcomm col(1) ///
note("% of gearthing")

You want at the same time have those higher percentage values (in one "gear" group) to be coloured darker.

I tried to do something similar with Jann, B. (2019). heatplot: Stata module to create heat plots and hexagon plots. Available from
http://ideas.repec.org/c/boc/bocode/s458598.html.


Code:
heatplot rep78 i.gear   , statistic(percent) ydiscrete(1)  cuts(0(.05)1) /// 
 sizeprop recenter colors(plasma, reverse)  ylabel(, nogrid)
But this doesn't calculate the percentages correct (only if I were using by(), which would change the esthetic to dramatic.

Is there any way to combine heat plot and tabplot to have the right colours?



Another thing with the same example: Is it possible with graph combine and xcomm to "force" that same values on the x-Axis (e.g. 3) are alway above each other? That is to say that in a tabplot you want an "empty" category in order to have plots "align"-able.


Thank you very much in advance for any hints.