I cannot be helpful in your request, so please ignore this post if it is not useful. Alas, I don't actually understand why you would want this? Batches that are correlated to specific data points that are evidence of assignable cause variation (Nelson or Western Electric rules) do not indicate they are failures. That is what specifications are intended for and we certainly realize specifications have little to do with actual process variation (since they are derived independently).
Control limits DO NOT equal specification limits.
The original intent of control chart method was to compare sources of variation and provide assistance in understanding causal structure (Of course for an appropriate comparison, first the basis for comparison, the within subgroup variation, should be tested for consistency, hence the range chart). They work best when they are actively used. For example, when a range chart displays an "out-of-control" condition, this suggests one or more of the x's in the process is assignably different at this point in time. Shewhart suggests It would be worth while to investigate at this point in time, while the process is running, not a post mortem. I will use an analogy. Imagine you are a criminal detective. When the range chart shows an OOC condition, this is when the crime is happening. It would be a rather easy crime to solve if you were actually present when the crime was committed (vs. having to look for clues after the crime was committed and subsequently testing hypotheses).
So for your example, you have already missed the opportunity to get a real-time look at the effects of x's in the process while they are exposing themselves, so to speak. The batches that correlate with those OOC conditions may, in fact, be the best batches you ever made.
BTW, that does not mean you can't plot the data in some other fashion.
"All models are wrong, some are useful" G.E.P. Box