What you use depends on what you are looking for.
But, first things first, neither Do
nor For
will work, as you found out, as both explicitly only return a value (a plot is considered a value) if Return
is used. (See below for ways to get For
and Do
to work.) Unfortunately, Return
breaks out of the For
and Do
immediately, so only the n==1
iteration is evaluated. So, it pays to use a function that is built for constructing lists rather than Do
or For
.
The simplest method of plotting a sequence of plots is as Artes said: use Table
. Between the two forms he proposes, I prefer the second form as it plots the functions on the same graph, but the first form is more akin to what you were attempting. As an alternative, you could Map
Plot
over the values of n
Plot[Sqrt[(1/#) x], {x, 0, 1}]& /@ Range[1,5]
or,
Plot[ Evaluate[ Sqrt[(1/#) x]& /@ Range[1,5] ], {x, 0, 1}]
Additionally, you should look at Manipulate
which allows you to manipulate the plot directly.
Manipulate[Plot[Sqrt[x/n], {x, 0, 1}, PlotRange -> {0, 1}], {n, 1, 5}]
gives

Note the use of PlotRange
which fixes the y-axis to a specific range. If it is not present, the plot looks identical, but the y-axis changes in scale. Lastly, there's animating the whole thing, as R.M suggested.
As an aside, the above code is what one would usually use if they want to create a new List
of objects. But, expressions can be constructed where both Do
and For
will in effect create a new List
. The secret is to use Append
or AppendTo
on a List
that already exists, or possibly using Reap
and Sow
.
Using your code for Do
as an example,
lst = {};
Do[AppendTo[lst, Plot[Sqrt[(1/n) x] , {x, 0, 1}]], {n, 1, 5}]
or, more verbosely
lst = {};
Do[lst = Append[lst, Plot[Sqrt[(1/n) x], {x, 0, 1}]], {n, 1, 5}]
and, most "simply"
Reap[Do[Sow[Plot[Sqrt[(1/n) x], {x, 0, 1}]], {n, 1, 5}]][[2]]