We can understand this circuit by using a simple ON/OFF diode model. The diode remains OFF until the middle node voltage reaches about 0.7 V, which happens when V_in*3/5 = 0.7 because of the voltage divider. Then, you can imagine the diode "locking in" at 0.7 V, and dragging it's negative terminal along for the ride.
The voltage source is set up as a triangle wave to sweep V_in from 0 to 5 V, and the plot is configured to use V_in as the x-axis for the other voltages and current.