How to retrieve from NASA Horizons site the needed data to plot analemmas for other planets? I posted such a question in space.stackexchange ( https://space.stackexchange.com/questions/46077/which-are-the-correct-input-parameters-for-nasa-horizons-query-to-get-the-right?noredirect=1#comment150190_46077 ), but probably it fits better here, being it a &quot;topocentric problem&quot;, although for other planets than Earth; we could call it &quot;eso-astronomy&quot; ;-)
I am trying to figure out how to retrieve the right data from Nasa Horizons to plot sun analemmas as seen from other worlds; I found a query which works fine for Earth, but upon changing the observer location from Earth to other planets, things get weird, and I get wrong curves w.r.t &quot;official&quot; curves (although there is not a single analemma curve for each planet, but different curves for different times).
This is the query I am using for Earth analemma centered on Greenwich at 12.00:
Result:

Using same coordinates on mars, a longer period, and 1477 minutes as interval (martian day length), I don't get the right plot (link):

The right analemma on Mars is this:

I noticed that Earth analemmas are plotted against Azimuth, but Mars analemmas are plotted against Equation of Time. Why? And how can I do by myself such a plot in Excel?
You did two things wrong, one minor, the other major. The minor thing that you did wrong was to chose the solar system barycenter as the target rather than the Sun. Use the Sun.
The major thing you did wrong was to use a step size of 1477 minutes. That is (to within a minute) the length of a Mars sidereal day. The Sun will march across the horizon if you use a sidereal day. What you want is a Mars solar day, which is 1479 minutes and 35 seconds long.
This presents a new problem. Ideally your step size should be 88775 seconds. But you cannot choose seconds as the unit of a step size. You're stuck with minutes, and that is suboptimal. There is another approach:

Choose the &quot;equal intervals (unitless)&quot; option for the step size,
Make the time difference between the start and end time be an integral multiple of 88775 seconds, and
Specify the step size as the integral multiple chosen to determine the time span.

For example, choosing 711 as the integral multiple and 2020-Aug-20 12:00:00 as the start time means the end time should be 2022-Aug-21 01:03:45. You might need to tweet the end time to get the analemma to close up properly.

Edit
I noticed that you used the center of Mars. You need a point on the surface to get a proper analemma. Horizons provides several predefined points. If you choose Viking 1 / Chryse @499, you'll have to modify the start and end times so that the Sun is above the horizon. Add 12 hours to the start and end times shown above appears to work very nicely for Viking 1's location.
Below is what I get plotting the Sun's elevation vs azimuth as seen from the Viking 1 / Chryse location, with 711 intervals (712 data points) sampled over the period 2020-Aug-21 00:00:00 to 2022-Aug-21 13:03:35 UT.