# Plot a family of solutions of ODE with singularity

In the post Use Mathematica to plot the flow of an ODE with discontinuity, the following ODE with discontinuous coefficient was solved

T = 1;
Y = ParametricNDSolveValue[{X'[t] == Boole[X[t] > 0], X[0] == x}, X, {t, 0, T}, {x}];
Show[
Table[
ParametricPlot[{Y[x][t], t}, {t, 0, T}],
{x, -1, 1, 0.1}
],
PlotRange -> All,
AxesLabel -> {"x", "t"}
]


I also wish to plot an additional family of solutions displayed in green in the picture below.

• How can a plot just like the one below (but possibly with the t axis being the vertical one) be done starting from the code above?

• Also, is it possible to have the "first" (x=t) and the "last" (x=0) of the green lines displayed in a different color (for example, blue instead of green)?

I'm not sure I understood, but if you only need to add some lines to existing plot from cited question:

T = 10;
Y = ParametricNDSolveValue[{X'[t] == Boole[X[t] > 0], X[0] == x},
X, {t, 0, T}, {x}];
Show[Plot[{x, x + Range[10]}, {x, 0, 10},
PlotRange -> {{-10, 10}, {0, 10}}, PlotStyle -> {Blue, Green}],
Table[ParametricPlot[{Y[x][t], t}, {t, 0, T}, PlotStyle -> Red], {x,
Complement[Range[-10, 10, 1], {0}]}],
Graphics[{Blue, Line[{{0, 0}, {0, 10}}]}], FrameLabel -> {"x", "t"},
Frame -> True, Axes -> False]


• Thank you. It looks very nice. By the way, is it possible to make the axis labels and the numbers a little bigger? – Riku Jan 3 '20 at 18:21
• Yes, you can add option like FrameStyle -> Directive[FontSize -> 16, Black] with font size you need, and also you may increase image size with ImageSize option. – Alx Jan 4 '20 at 0:44