Interesting LaTeX Packages – Drawing the Solar System

Many times we need to quickly illustrate the solar system or the planets. Usually we use photos to illustrate the planets. But sometimes the photos can be an over kill. Also to draw the entire solar system is a typical and can be used for illustrative purposes. Though most of the illustrations of the solar system in the school and other text books are horribly out of scale, (with no indication that the figure is not to scale!). For example,  look at the illustration in the Class 6 Science Textbook from NCERT.

A good visualisation will always present a scale, and/or indicate whether the visualisation is to the scale or not. Though in the visualisation above the distances are given, they are not to scale.


Coming back to the topic of our post, a simple way to draw solar system diagram in latex is to use the PStricks package solarsystem. The package can create “Position of the visible planets, projected on the plane of the ecliptic” at a given time and date. This feature might be useful sometimes.

From the package manual:

As we can not represent all the planets in the real proportions, only Mercury, Venus, Earth and Mars are the proportions of the orbits and their relative sizes observed. Saturn and Jupiter are in the right direction, but obviously not at the right distance.
The orbits are shown in solid lines for the portion above the ecliptic and dashed for the portion located below.

The use of the command is very simple, just specify the date of observation with the following parameters, for example:
By default, if no parameter is specified, \SolarSystem gives the configuration day 0 hours to compile.

The resulting output for the above code:

The output also provides the longitude and latitude of the planets at the time given.

Another package that is useful to create free standing planets is the tikz-planets package which we will see next.

Leave a Reply

Your email address will not be published. Required fields are marked *