MATLAB: Keep Getting This Error when plotting historgram and plot

histogramMATLABplot

Below is the error im getting while im trying to plot a histrogram and a function on the same plot. My buddy and I are doing this together and his output shows both the histogram and the function, mine only shows the function while giving me this error about the histogram colour. Please help! error.PNG

Best Answer

Use yyaxis left before plotting the histogram. If you can share the data and the parameter values, I could try to debug.