How to align two axes with CombinePlots?

How can I align the lowest point and highest point of these two axes like 0 is aligned with 0 and 3 is aligned with 1.0 on the other axis?

The desired output is something like this (just to show the alignment and padding):

plot1 = Plot[x, {x, 0, 3}, PlotStyle -> {Red, Thick},
LabelStyle -> Directive[Bold, 12, Black], ImagePadding -> True,
Frame -> {True, True, True, True},
FrameStyle -> {Black, Red, Black, Transparent},
GridLines -> {Range[0, 3, 0.2], Range[0, 3, 0.2]}];
plot2 = Plot[{x, 1/x}, {x, 0, 5},
PlotStyle -> Directive[Blue, Thickness[0.01], CapForm["Round"]],
GridLines -> {Range[0, 3, 0.2], Range[0, 1, 0.2]},
PlotRange -> {{0, 5}, {0, 1}}, ImagePadding -> True,
Frame -> {{True, False}, {True, True}},
FrameStyle -> {{Directive[Blue, Thickness[0.005]],
""}, {Directive[Black, Thickness[0.005]], ""}}];
ResourceFunction["CombinePlots"][plot1, plot2, "AxesSides" -> "TwoY"]
• You could always play with PlotRange for plot2: PlotRange -> {{0, 5}, {-0.055, 1.055}}. This aligns the blue labels with the grid and has the advantage of showing the curves for x and 1/x crossing instead of appearing to be the same function. Sep 4, 2022 at 1:28
• @Jean-Pierre how would you get the number 0.055? Sep 4, 2022 at 5:51
• This is just trial and error increasing the range to compress the axis and go around the problem while maintaining these empty areas around the curves. A more standard appearance (eliminating empty areas) would be to set the PlotRange of plot1: PlotRange -> {{0, 3}, {0, 3}}. Sep 4, 2022 at 12:17
• @Jean-Pierre how can I keep the empy area (padding) like your first method without trial and error? It looks simple but doesn't seem so. Sep 4, 2022 at 20:52

Careful control of PlotRangePadding gets you what you want:

plot1 = Plot[x, {x, 0, 3}, PlotStyle -> {Red, Thick},
LabelStyle -> Directive[Bold, 12, Black], ImagePadding -> True,
Frame -> {True, True, True, True},
FrameStyle -> {Black, Red, Black, Transparent},
GridLines -> {Range[0, 3, 0.2], Range[0, 3, 0.2]},