For example, I would like to draw a graph of y=2*x but I just want some part of the full graph. Adding a domain to the variable x is needed, but I tried some ways, they all didn’t work.

So how to use the function to draw the graph like y=2*x and x is ranged from 2 to 4.

[ps. There is something wrong with the uploaded, so I cannot share my picture from my picture library.]