Usually it’s nice to have an explanation of what you want to do rather than just a script to complete :).
The matplotlib documentation has excellent examples for these kind of graphs, both box-points with errors and line graphs with errors.
Also, as general tip, matplotlib can take numpy arrays with floats and NaN values and interpret the NaN as “missing data“ and not draw the value, so if you use that you don’t need to do the [d if d is not None else 0] tricks.