It's notoriously difficult to make the two plots align vertically, because they are different in width. The rel_widths ratio varies depending on how many digits the maximum expression has (as this is displayed in feat's legend).
Solution I'd like to implement:
make both plots a little wider, by extending the x-axis (increasing the maximal UMAP1 coordinate value)
for feat, put the legend into this area as inset graph. Does that work?!
for rule, put TRUE / FALSE together with the corresponding number of cells there, colored same as the points.
The two plots now have the same width, and the CP10K legend is included as third plot. plot_last has the legend_rel_width argument to control the size of this legend.
Plot_last creates two plots:
It's notoriously difficult to make the two plots align vertically, because they are different in width. The rel_widths ratio varies depending on how many digits the maximum expression has (as this is displayed in feat's legend).
Solution I'd like to implement: