You can define your function like this
MyPlot([Usual stuff], xrange = None, yrange = None):
if xrange != None and yrange != None:
do special stuff
else:
ordinary stuff
Now, xrange
and yrange
accept None
as default parameters. So, that you can ignore them while calling them. If those parameters are ignored, by default None
will be assigned to those variables.