I am trying to build up a GUI interface similar to the figure.
Basically, I need to have two panels. The panel on the left shows the x,y scatter plot of my data, the panel on the right shows the corresponding histogram of y values. Furthermore, on the bottom of the histogram panel, I want to have a drag to change the bin size. Once I change the bin size, the histogram panel will update automatically. Any help is greatly appreciated.
You can use scatterhist to create the scatter plot and a histogram next to it. To add a slider to the same figure, you can do:
where you would have to specify a better position yourself.