The graph below shows a fixed-end frame subjected to a concentrated load in the mid-span of the horizontal member and the resulting deflected shape.

Let's draw tangent lines on the deflected shapes at joints B, we note that both the curved segments of BF & BE are deflected away from the respective tangent lines with the angle of rotation $\theta = 0$, which is the same as a cantilever beam, so we identify these surfaces are subjected to tension. The same phenomenon is noted at the support joint A (with respect to the vertical column), and at the load point.
Now we have identified all surfaces subjected to tension with the realization that the tension is caused/countered by a moment, therefore we can place the moment diagram accordingly - draw the moment diagram on the tension side of a member, which is the typical convention. (See graph below)
On the graph above, the points E, F, G, and H are inflection points, at which, M = 0, and the directional sign changes on both sides of the inflection point. (At the support points of the columns, there is a pair of inward lateral forces, as shown on the first picture of your graph, that restricts the outward tendency of the legs. The lateral force produces a moment in the direction counter the moment at the support, and the internal moments of the column eventually cancel out at the inflection joint.)

Note, both the frame height to width ratio (h/L) and the ratio of the moment of inertia of the column vs the beam affects the moment intensities at the joints, nevertheless, for a framing column with consistent geometries throughout the height, the lower-end (support) moment of the column is always one-half of the moment at the upper-end beam-column joint.
I guess you are taking the class "Structural Analysis I", and prematurely wondering into the topics of the class of the next level. As it is essential to learn the classic methods before attempting to predict/estimate the results using simplification, I won't go beyond what I've offered thus far, so as not to confuse you or conflict with your future education.
Information (for this case only):
