Consider the code for the bifurcation diagram:
res = Internal`Bag[]; tmax = 5; {x0, y0, z0} = {1, 1, 1}; Suppose I define p1 as:
p1 = Do[sol = NDSolve[{x'[t] == 10 (y[t] - x[t]), y'[t] == (r*1) x[t] - y[t] - x[t] z[t], z'[t] == x[t] y[t] - 4 z[t], x[0] == x0, y[0] == y0, z[0] == z0,(*save extrema of z[t]*) WhenEvent[z'[t] == 0, Internal`StuffBag[res, {r, z[t]}]]}, {x, y, z}, {t, 0, tmax}][[1]];{x0, y0, z0} = {x[tmax], y[tmax], z[tmax]} /. sol;, {r, 1, 200, 0.5}]; ListPlot[Internal`BagPart[res, All], PlotStyle -> {Gray, Opacity[0.1], PointSize[0.001]}, AxesLabel -> {"r", "z"}, Frame -> {{True, True}, {True, False}}, FrameLabel -> {"r", "Z"}] and p2 as:
p2 = Do[sol = NDSolve[{x'[t] == 9 (y[t] - x[t]), y'[t] == (r*2) x[t] - y[t] - x[t] z[t], z'[t] == x[t] y[t] - 5 z[t], x[0] == x0, y[0] == y0, z[0] == z0,(*save extrema of z[t]*) WhenEvent[z'[t] == 0, Internal`StuffBag[res, {r, z[t]}]]}, {x, y, z}, {t, 0, tmax}][[1]];{x0, y0, z0} = {x[tmax], y[tmax], z[tmax]} /. sol;, {r, 1, 200, 0.5}]; ListPlot[Internal`BagPart[res, All], PlotStyle -> {Gray, Opacity[0.1], PointSize[0.001]}, AxesLabel -> {"r", "z"}, Frame -> {{True, True}, {True, False}}, FrameLabel -> {"r", "Z"}] How can I merge p1 and p2 with a common x-axis as shown in this plot: https://i.sstatic.net/UXZnF8ED.png
Any help would be really appreciated.

Plot[{f[x],g[x]},{x,0,1}]...? $\endgroup$