Draw function on a subrange

Dear experts,

I retrieved a function that fit an histogram over a range [0, 2]. Now I want to draw this fit function on different subrange between [0, 2] in different color.

I wonder if there is a draw option to draw the function on the range that I want?
If not can you please tell me how I can do that?

regards

Can you provide a small code example so we can know what you call “function” ?

Dear Couet,

thank you for your answer. I figured out how to do it.

Regards