I have encountered a Plotly Subplot overlapping when using callbacks or variable urls. Here is the example:
When I load the page at the very beginning, the graph looks good as desired, a smooth line is observed in subplot:

However, when updating the graph by callbacks, there are extra data points from subplot in previous graph intersecting with updated subplot (many red points in this case):

It is hard to provide the source code as this involves a few files.
May I know if there is any solution or concepts that I misunderstand? Appreciated if we could discuss together.