I have made a GUI in GUIDE to plot a scatter plot above a contour plot. Next to these plots I have two edit boxes for x-axis min and x-axis max, and an "update plots" button to update the plots with the new x min and max values. Unfortunately, if I have a scatter plot, the contour plot will take a long time to update when certain x-axis values are used. For example, if I change x min = 500, the plots will update in ~ 1 second; however, if I use x min = 700 the plots take over 15 minutes to update. If I take out the scatter plot the problem goes away. Any ideas why this happens?
I have included a simplified code and sample data (attached) as an example of the issue. This code only updates the contour plot, but you can still see the problem. This problem is reproducible on two computers. I have also included a screenshot of the simplified GUI.
Thanks in advance for your help!
Best Answer