Displaying graphs with dots as a function is running

I am working on a function which displays a graph, then asks a user to enter a number based on the appearance of the graph. I would like the graph trace to be displayed as dots rather than lines, and so I used

ModifyGraph mode=2

The problem is this only seems to change the trace to dots after the entire program is done running. Even if I have this in a function called by another function, and the function in which ModifyGraph appears ends, the appearance of the graph still does not change until the entire program is complete. Is there a way to change the graph's appearance before prompting the user for input within a function?
Look up the command DoUpdate. Use in the functions at places where you want graphs or tables to update.

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville