Why do I get this weird curve for impedance vs Frequency
Assuming the impedance is being calculated correctly, your problem is that you are starting at a low frequency (10 μHz) for which the impedance of your capacitor is very high (tens of megohms). The program scales the graph to display those values so that at frequencies near the resonance of your circuit (79 Hz), where the impedance is just the 150 Ω resistor, the graph hugs the frequency axis. You need to either plot the impedance as a log value or start the plot at a much higher frequency like 1 Hz.