# PlotMarkers in Mathematica with using an iteration scheme

I have the following operator $$T:[0,1]\rightarrow[0,1]$$ by $$Tx=\frac{x}{2}$$. I use the following method for two different initial point $$x_{0}\in[0,1]$$ as $$x_{n+1}=Tx_{n}$$ $$n=0,1,2,3,...$$ I have set the following codes in mathemtica for $$x_{0}=0.1$$ and $$x_{0}=0.9$$ as

Clear[x, T, a, b, c]
T[x_] := T[x] = (x/2)
x = 0.1;
x[n_] := x[n] = T[x[n - 1]]
NumberForm[a1 = {Table[x[i], {i, 0, 6}]}, 4]


The plot code is for this I used

plot1 = ListPlot[a1, Joined -> True, PlotStyle -> Red]


Now for the secod initial Point

Clear[x, T, a, b, c]
T[x_] := T[x] = (x/2)
x = 0.1;
x[n_] := x[n] = T[x[n - 1]]
NumberForm[a1 = {Table[x[i], {i, 0, 6}]}, 4]


The plot code is for this I used

Clear[x, T, a, b, c]
[x_] := T[x] = (x/2)
x = 0.9;
x[n_] := x[n] = T[x[n - 1]]
NumberForm[a2 = {Table[x[i], {i, 0, 6}]}, 4]


And plotting these vales as:

plot2 = ListPlot[a2, Joined -> True, PlotStyle -> Blue]


I have combined these two plots as:

Show[plot1, plot2, PlotRange -> Automatic, Frame -> {{True, True}, {True, True}},FrameLabel -> {Style["Number of iterates", Black, Small],Style["Absolute error", Black, Small]},Epilog->Inset[LineLegend[{Red, Blue, Cyan}, {"x0=0.1", "x0=0.9"}], {5,0.4}]]


I get the following attached graph . But I need a graph and legend Plotmarker like https://i.stack.imgur.com/KWX9u.jpg this full post is at Show[List of plot] how to color them differently?

• Dear @Michael I need PlotMarkers Apr 2 at 18:53

Clear[x, T]
T[x_] := T[x] = (x/2)
x = 0.1;
x[n_] := x[n] = T[x[n - 1]]
NumberForm[a1 = Table[x[i], {i, 0, 6}], 4] Clear[x, T]
T[x_] := T[x] = (x/2)
x = 0.9;
x[n_] := x[n] = T[x[n - 1]]
NumberForm[a2 = Table[x[i], {i, 0, 6}], 4] ListLinePlot[{a1, a2},
PlotStyle -> {Red, Blue},
PlotMarkers -> {Automatic, 8},
Frame -> True,
FrameLabel -> {Style["Number of iterates", Black, Small],
Style["Absolute error", Black, Small]},
PlotLegends ->
Placed[
StringForm[" = ", Subscript[x, 0], #] & /@ {0.1, 0.9}, {5/7,
2/3}]] • Thanks Dear @Bob I have got what I need. Thanks Again Apr 2 at 19:39
• @Junaid since you tested the code and said that it works, it's a simple task to upvote and/or accept the answer, and also a matter of politeness. I am just sharing a thought here, since you have not accepted any answers to any of your questions.
– bmf
Apr 2 at 19:54
• Dear @Bob can you provide me a code for dashing? Apr 2 at 20:50
• Use PlotStyle -> {{Red, Dashed}, {Blue, Dotted}} Also see the documentation for Dashing, AbsoluteDashing, and DotDashed Apr 2 at 20:56
• I got the desired aims. Thanks dear @Bob Hanlon Apr 3 at 0:29