Unlike the last picture, the magnetic field is not just in a 2D plane. It also extends forward and backward from the magnet - as shown here. So this final picture is more accurate but it is also really complicated.
Both pictures also suggest that there is only field where you see a line. That's not true. There is field everywhere - more lines just mean it's stronger in that area (like the altitude lines on a contour map).
Is there a more accurate way of showing a magnetic field? Well, sort of.