Automatically change the interval of a specific (the same) graph

Hi friends,

Is there a way (code afl) to automatically change the interval of a specific (the same) graph depending on the value under consideration?

Thanks for any help.