MATLAB: How to specify dotted line for histfit

histfitMATLAB

The default fitted line in histfit is a continuous line. How do I replace it with a dotted line?
Thanks.

Best Answer

Oddly, it doesn't look like you can specify it at runtime. You'll have to save the handle, and apply LineStyle afterward.
h = histfit(data);
h(2).LineStyle = ':';