How to Align KDE Plots to the Edges of a Scatterplot in React with TypeScript and D3.js
I am working on creating a component that includes scatterplots for multiple datasets and KDE (Kernel Density Estimation) plots for the x and y-coordinates of those datasets, in React with TypeScript using D3.js.
So far, I have successfully implemented the KDE plot and the scatter plot. However, I am having trouble aligning the KDE plots to the right and top edges of my scatterplot, similar to how scatterhist produces output in MATLAB.
This is the plot I have been able to make so far, but the KDE Plots are not getting aligned to the top and right edges.