Full disclaimer: I'm the author and main developer of poliastro.
The most important step before doing anything is somehow retrieving the positions and velocities of the planets of the Solar System. Astropy, one of the core dependencies of poliastro, ships medium-precision approximate models described in Simon et al "Numerical expressions for precession formulae and mean elements for the Moon and the planets" (1994). However, for high precision applications it's better to directly download the ephemeris from JPL, based on observational data from many different sources and covering a wide time span[1]. Another Python package, jplephem, is able to read the Chebyshev polynomials contained in these files and compute the cartesian elements of the available bodies.
After setting precise dates of launch and arrival, in this case for the Mars Science Laboratory mission, and neglecting the Trajectory Correction Maneuvers (TCMs) and other deviations from Keplerian trajectories, poliastro can solve the Two Body Boundary Problem, also known as Lambert's problem, which gives the trajectory between two given points. There are several algorithms to solve Lambert's problem, and poliastro uses the Izzo algorithm, described at Izzo "Revisiting Lambert's Problem" (2014), which uses a Householder iterative method (the 3rd order equivalent of Newton's method) to attain faster convergence with fewer function evaluations.
After that, the only remaining thing is plotting[2]. For Keplerian trajectories, poliastro already knows how to best sample the points to maximize efficiency (and to avoid ugly effects at the apocenter of highly eccentric orbits) by using a smart method described in Berry & Healy "The generalized Sundman transformation for propagation of high-eccentricity elliptical orbits" (2002). For the case of already computed trajectories or non keplerian orbits, poliastro allows the user to just use the set of vectors. To produce simpler 2D plots, poliastro reprojects all the orbits onto the perifocal frame of the first orbit. On the other hand, 3D plots do not require any kind of preprocessing.

[1] An alternative source with a compatible file format is the "Institut de Mécanique Céleste et de Calcul des Éphémérides" https://www.imcce.fr/recherche/equipes/asd/inpop/download17a#4, but they are not yet supported by Astropy.
[2] The only reason the plots were not appearing was because of an annoying bug with the underlying 3D JavaScript library and the documentation website.