---
title: "AstroGraphics"
language: "en"
type: "Symbol"
summary: "AstroGraphics[primitives, options] represents a two-dimensional view of space and the celestial sphere."
keywords: 
- astronomy
- astrophysics
- sky map
- sky chart
- star map
- star chart
- planet chart
canonical_url: "https://reference.wolfram.com/language/ref/AstroGraphics.html"
source: "Wolfram Language Documentation"
related_guides: 
  - 
    title: "Astronomical Computation & Data"
    link: "https://reference.wolfram.com/language/guide/AstronomicalComputationAndData.en.md"
related_functions: 
  - 
    title: "AstroPosition"
    link: "https://reference.wolfram.com/language/ref/AstroPosition.en.md"
  - 
    title: "GeoGraphics"
    link: "https://reference.wolfram.com/language/ref/GeoGraphics.en.md"
  - 
    title: "Graphics"
    link: "https://reference.wolfram.com/language/ref/Graphics.en.md"
  - 
    title: "AstroAngularSeparation"
    link: "https://reference.wolfram.com/language/ref/AstroAngularSeparation.en.md"
  - 
    title: "AstroDistance"
    link: "https://reference.wolfram.com/language/ref/AstroDistance.en.md"
  - 
    title: "AstroCenter"
    link: "https://reference.wolfram.com/language/ref/AstroCenter.en.md"
  - 
    title: "AstroGridLines"
    link: "https://reference.wolfram.com/language/ref/AstroGridLines.en.md"
  - 
    title: "AstroGridLinesStyle"
    link: "https://reference.wolfram.com/language/ref/AstroGridLinesStyle.en.md"
  - 
    title: "AstroProjection"
    link: "https://reference.wolfram.com/language/ref/AstroProjection.en.md"
  - 
    title: "AstroRange"
    link: "https://reference.wolfram.com/language/ref/AstroRange.en.md"
  - 
    title: "AstroRangePadding"
    link: "https://reference.wolfram.com/language/ref/AstroRangePadding.en.md"
---
[EXPERIMENTAL]

# AstroGraphics

AstroGraphics[primitives, options] represents a two-dimensional view of space and the celestial sphere.

## Details and Options

* ``AstroGraphics`` constructs maps of any region of the sky, as viewed on any date from anywhere in the solar system.

* ``AstroGraphics`` has the same options as ``Graphics``, with the following additions: []

|                      |           |                                             |
| -------------------- | --------- | ------------------------------------------- |
| AstroBackground      | Automatic | style specifications for the background     |
| AstroCenter          | Automatic | center coordinates to use                   |
| AstroGridLines       | None      | coordinate grid lines to draw               |
| AstroGridLinesStyle  | Automatic | style specifications for astro grid lines   |
| AstroReferenceFrame  | Automatic | observation data (frame, date, location, …) |
| AstroProjection      | Automatic | projection to use                           |
| AstroRange           | Automatic | area of the sky to include                  |
| AstroRangePadding    | Automatic | how much to pad the astro range             |
| AstroZoomLevel       | Automatic | zoom level to use for the astro background  |
| MetaInformation      | <\|\|>    | metainformation about the sky map           |
| PerformanceGoal      | Automatic | aspects of performance to try to optimize   |

* ``AstroGraphics[]`` gives a map of the sky above the horizon at your current geo location.

* ``AbsoluteOptions`` can be used to give explicit values for astro graphics settings.

* Using ``AstroGraphics`` requires internet connectivity.

* ``AstroGraphics`` downloads ephemeris data files for solar system objects, storing them permanently in ``FileNameJoin[{\$UserAddOnsDirectory, "ApplicationData", "Astro"}]``.

### List of all options

|                        |                 |                                                                                    |
| ---------------------- | --------------- | ---------------------------------------------------------------------------------- |
| AlignmentPoint         | Center          | the default point in the graphic to align with                                     |
| AspectRatio            | Automatic       | ratio of height to width                                                           |
| AstroBackground        | Automatic       | style specifications for the background                                            |
| AstroCenter            | Automatic       | center coordinates to use                                                          |
| AstroGridLines         | None            | coordinate grid lines to draw                                                      |
| AstroGridLinesStyle    | Automatic       | style specifications for astro grid lines                                          |
| AstroProjection        | Automatic       | projection to use                                                                  |
| AstroRange             | Automatic       | area of the sky to include                                                         |
| AstroRangePadding      | Automatic       | how much to pad the astro range                                                    |
| AstroReferenceFrame    | Automatic       | observation data (frame, date, location, …)                                        |
| AstroZoomLevel         | Automatic       | zoom level to use for the astro background                                         |
| Axes                   | False           | whether to draw axes                                                               |
| AxesLabel              | None            | axes labels                                                                        |
| AxesOrigin             | Automatic       | where axes should cross                                                            |
| AxesStyle              | {}              | style specifications for the axes                                                  |
| Background             | None            | background color for the plot                                                      |
| BaselinePosition       | Automatic       | how to align with a surrounding text baseline                                      |
| BaseStyle              | {}              | base style specifications for the graphic                                          |
| ContentSelectable      | Automatic       | whether to allow contents to be selected                                           |
| CoordinatesToolOptions | Automatic       | detailed behavior of the coordinates tool                                          |
| Epilog                 | {}              | primitives rendered after the main plot                                            |
| FormatType             | TraditionalForm | the default format type for text                                                   |
| Frame                  | False           | whether to put a frame around the plot                                             |
| FrameLabel             | None            | frame labels                                                                       |
| FrameStyle             | {}              | style specifications for the frame                                                 |
| FrameTicks             | Automatic       | frame ticks                                                                        |
| FrameTicksStyle        | {}              | style specifications for frame ticks                                               |
| GridLines              | None            | grid lines to draw                                                                 |
| GridLinesStyle         | {}              | style specifications for grid lines                                                |
| ImageMargins           | 0.              | the margins to leave around the graphic                                            |
| ImagePadding           | All             | what extra padding to allow for labels etc.                                        |
| ImageSize              | Automatic       | the absolute size at which to render the graphic                                   |
| LabelStyle             | {}              | style specifications for labels                                                    |
| MetaInformation        | <\|\|>          | metainformation about the sky map                                                  |
| Method                 | Automatic       | details of graphics methods to use                                                 |
| PerformanceGoal        | Automatic       | aspects of performance to try to optimize                                          |
| PlotLabel              | None            | an overall label for the plot                                                      |
| PlotRange              | All             | range of values to include                                                         |
| PlotRangeClipping      | False           | whether to clip at the plot range                                                  |
| PlotRangePadding       | Automatic       | how much to pad the range of values                                                |
| PlotRegion             | Automatic       | the final display region to be filled                                              |
| PreserveImageOptions   | Automatic       | whether to preserve image options when displaying new versions of the same graphic |
| Prolog                 | {}              | primitives rendered before the main plot                                           |
| RotateLabel            | True            | whether to rotate y labels on the frame                                            |
| Ticks                  | Automatic       | axes ticks                                                                         |
| TicksStyle             | {}              | style specifications for axes ticks                                                |

---

## Examples (28)

### Basic Examples (5)

Show a map of the current sky above you, showing the equatorial, ecliptic, galactic and horizon planes:

```wl
In[1]:= AstroGraphics[]

Out[1]= [image]
```

---

Show the sky above you on a given date, adding a background image:

```wl
In[1]:= AstroGraphics[AstroReferenceFrame -> {"Horizon", DateObject[{2022, 10, 23, 15, 0, 0}]}, AstroBackground -> "GalacticSky"]

Out[1]= [image]
```

---

Show an area of the sky around the star Betelgeuse:

```wl
In[1]:= AstroGraphics[Entity["Star", "Betelgeuse"], AstroRange -> Quantity[20, "AngularDegrees"], AstroReferenceFrame -> "Equatorial"]

Out[1]= [image]
```

Add constellation illustrations and remove the equatorial, ecliptic and galactic planes:

```wl
In[2]:= AstroGraphics[Entity["Star", "Betelgeuse"], AstroRange -> Quantity[30, "AngularDegrees"], AstroReferenceFrame -> "Equatorial", AstroBackground -> AstroStyling[{"BlackSky", "ShowConstellationIllustrations" -> True, "ShowMainPlanes" -> False}]]

Out[2]= [image]
```

---

Visualize the neighborhood of the galactic center:

```wl
In[1]:= AstroGraphics[Entity["Star", "Shaula"], AstroRange -> Quantity[20, "AngularDegrees"], AstroBackground -> "GalacticSky", AstroReferenceFrame -> "Ecliptic"]

Out[1]= [image]
```

---

Compute weekly positions of Mars from January 2022 to July 2023:

```wl
In[1]:= mars = AstroPosition[Entity["Planet", "Mars"], {"Equatorial", #}]& /@ DateRange["1 Jul 2022", "1 July 2023", "Week"];
```

Part of the trajectory was in retrograde motion:

```wl
In[2]:= AstroGraphics[{White, Point[mars]}, AstroReferenceFrame -> "Equatorial"]

Out[2]= [image]
```

### Options (16)

#### AstroBackground (3)

``AstroGraphics`` uses the ``"BlackSky"`` style by default:

```wl
In[1]:= AstroGraphics[AstroBackground -> "BlackSky"]

Out[1]= [image]
```

---

Use the ``"WhiteSky"`` style, with white background and dark colors for the stars:

```wl
In[1]:= AstroGraphics[AstroBackground -> "WhiteSky"]

Out[1]= [image]
```

---

Specify styling directives for constellation:

```wl
In[1]:=
style = {
	"ShowConstellationIllustrations" -> True, 
	"ShowConstellationRegions" -> True, "ConstellationRegionStyle" -> Darker[Blue, .2], "ConstellationLineStyle" -> Opacity[0.6, LightBlue], 
	"ShowConstellationBoundaries" -> True, "ConstellationBoundaryStyle" -> Directive[Dashing[{0, Tiny}], Yellow], "ConstellationNameStyle" -> GrayLevel[0.7]
	};

In[2]:= AstroGraphics[Entity["Constellation", "Scorpius"], AstroBackground -> AstroStyling[{"GalacticSky", "ShowConstellations" -> {Entity["Constellation", "Scorpius"]}, style}], AstroReferenceFrame -> "J2000"]

Out[2]= [image]
```

#### AstroCenter (1)

Display Mercury and Venus, centering the map at the position of the Sun:

```wl
In[1]:= AstroGraphics[{White, Point /@ {Entity["Planet", "Mercury"], Entity["Planet", "Venus"]}}, AstroCenter -> Entity["Star", "Sun"], AstroReferenceFrame -> "Ecliptic"]

Out[1]= [image]
```

#### AstroGridLines (2)

Show astro grid lines of the given frame:

```wl
In[1]:= AstroGraphics[AstroGridLines -> Automatic]

Out[1]= [image]
```

---

Add astro grid lines of frames other than the frame used to construct the map:

```wl
In[1]:= AstroGraphics[AstroGridLines -> {"Galactic" -> Quantity[15, "AngularDegrees"]}]

Out[1]= [image]
```

The equatorial grid has its North Pole very close to Polaris:

```wl
In[2]:= AstroGraphics[AstroGridLines -> {"Equatorial" -> Quantity[{45, 10}, "AngularDegrees"]}]

Out[2]= [image]
```

#### AstroGridLinesStyle (1)

Change the default style of the astro grid lines:

```wl
In[1]:= AstroGraphics[AstroGridLines -> Automatic, AstroGridLinesStyle -> Directive[Dashed, Opacity[0.2, White]]]

Out[1]= [image]
```

#### AstroProjection (1)

Use different projections:

```wl
In[1]:= AstroGraphics[AstroProjection -> "LambertAzimuthal", AstroRangePadding -> None, AstroReferenceFrame -> {"Equatorial", Now, Here}, AstroRange -> {All, All}]

Out[1]= [image]

In[2]:= AstroGraphics[AstroProjection -> "WinkelTripel", AstroRangePadding -> None, AstroRange -> {All, All}]

Out[2]= [image]
```

#### AstroRange (1)

Show 10 angular degrees around the current position of Jupiter:

```wl
In[1]:= AstroGraphics[Entity["Planet", "Jupiter"], AstroRange -> Quantity[10, "AngularDegrees"]]

Out[1]= [image]
```

Zoom in around Jupiter until you see the positions of the Galilean satellites:

```wl
In[2]:= AstroGraphics[Entity["Planet", "Jupiter"], AstroRange -> Quantity[0.04, "AngularDegrees"]]

Out[2]= [image]
```

#### AstroRangePadding (1)

Add 5 angular degrees of padding in all directions around the range including two stars:

```wl
In[1]:= AstroGraphics[{Entity["Star", "Rigel"], Entity["Star", "Betelgeuse"]}, AstroReferenceFrame -> "Ecliptic", AstroRangePadding -> Quantity[5, "AngularDegrees"]]

Out[1]= [image]
```

#### AstroReferenceFrame (5)

By default, ``AstroGraphics`` uses the local horizon frame and the ``"Stereographic"`` projection:

```wl
In[1]:= AstroGraphics[]

Out[1]= [image]
```

---

Show the full sky, using the equatorial frame, in the ``"Equirectangular"`` projection:

```wl
In[1]:= AstroGraphics[AstroReferenceFrame -> {"Equatorial", Now, Here}]

Out[1]= [image]
```

---

Show the full sky, using the ecliptic frame, in the ``"Equirectangular"`` projection:

```wl
In[1]:= AstroGraphics[AstroReferenceFrame -> {"Ecliptic", Now, Here}]

Out[1]= [image]
```

---

Show the full sky, using the galactic frame, with the result using the ``"Mollweide"`` projection:

```wl
In[1]:= AstroGraphics[AstroReferenceFrame -> {"Galactic", Now, Here}]

Out[1]= [image]
```

---

Compute the position of the North Celestial Pole every 1000 years for the past 14000 years:

```wl
In[1]:= NCPs = Table[AstroPosition[{0, 90}, {"Equatorial", DateObject[{y, 1, 1, 0, 0, 0}]}], {y, 2022, -12000, -1000}];
```

It was close to the star Vega around year −12000:

```wl
In[2]:= AstroGraphics[{Red, Point@NCPs}, AstroReferenceFrame -> {"Ecliptic", "Epoch" -> Now}, AstroGridLines -> Automatic]

Out[2]= [image]
```

#### AstroZoomLevel (1)

Use different zoom levels to get different levels of background image quality:

```wl
In[1]:= Table[AstroGraphics[Entity["Nebula", "M8"], AstroReferenceFrame -> "J2000", AstroBackground -> "GalacticSky", AstroRange -> Quantity[15, "AngularDegrees"], AstroZoomLevel -> zoom, ImageSize -> 250], {zoom, 1, 4}]

Out[1]= {[image], [image], [image], [image]}
```

### Applications (6)

Construct the analemma of the Sun, formed by its positions every day at a fixed time for a year:

```wl
In[1]:=
loc = Entity["City", {"NewYork", "NewYork", "UnitedStates"}];
hour = 12;

In[2]:= suns = Table[AstroPosition[Entity["Star", "Sun"], {"Horizon", DateObject[{2022, 1, d, hour}], loc}], {d, 1, 365}];
```

Draw weekly positions, here shown over the sky of a date close to the vernal equinox:

```wl
In[3]:= AstroGraphics[{White, Point[Take[suns, {1, -1, 7}]]}, AstroReferenceFrame -> {"Horizon", DateObject[{2022, 3, 19, hour}], loc}, AstroProjection -> {"Stereographic", "Centering" -> {0, 180}}, AstroRange -> {{115, 245}, {-5, 80}}]

Out[3]= [image]
```

Show the same analemma over the sky of a date close to the summer solstice:

```wl
In[4]:= AstroGraphics[{White, Point[Take[suns, {1, -1, 7}]]}, AstroReferenceFrame -> {"Horizon", DateObject[{2022, 6, 18, hour}], loc}, AstroProjection -> {"Stereographic", "Centering" -> {0, 180}}, AstroRange -> {{115, 245}, {-5, 80}}]

Out[4]= [image]
```

---

Plot the positions of Venus at noon, every day over a period of 8 years:

```wl
In[1]:=
loc = GeoPosition[{40, -90}];
hour = 12;
tz = -5;

In[2]:= venus = Table[AstroPosition[Entity["Planet", "Venus"], {"Horizon", DateObject[{2000, 1, d, 12}, TimeZone -> tz], loc}], {d, 1, 8 365}];

In[3]:= AstroGraphics[{White, PointSize[Tiny], Point[venus]}, AstroReferenceFrame -> {"Horizon", DateObject[{2004, 7, 1, hour}, TimeZone -> tz], loc}, AstroProjection -> {"Stereographic", "Centering" -> {0, 180}}, AstroRange -> {{90, 240}, {-5, 80}}]

Out[3]= [image]
```

---

Show the southern sky at 2pm at your location:

```wl
In[1]:= AstroGraphics[AstroRange -> {{85, 275}, {-1, 55}}, AstroReferenceFrame -> {"Horizon", DateObject[{2022, 10, 24, 14, 0, 0}], Here}, AstroProjection -> {"Stereographic", "Centering" -> {0, 180}}, AstroGridLines -> Quantity[15, "AngularDegrees"], AstroGridLinesStyle -> Opacity[.2, White]]

Out[1]= [image]
```

---

Observe the transit of Venus in front of Jupiter, November 22, 2065, better viewed near the South Pole:

```wl
In[1]:= Manipulate[AstroGraphics[Entity["Planet", "Jupiter"], AstroReferenceFrame -> {"Equatorial", DateObject[{2065, 11, 22, h, 0, 0}, TimeZone -> 0], GeoPosition[{-90, 0}]}, AstroRange -> Quantity[0.02, "AngularDegrees"]], {h, 12.5, 13}, SynchronousUpdating -> False]

Out[1]= DynamicModule[«8»]

 DynamicModule[«3»]
```

---

Visualize an annular solar eclipse:

```wl
In[1]:= Manipulate[AstroGraphics[Entity["Star", "Sun"], AstroReferenceFrame -> {"Equatorial", date, Entity["City", {"Eugene", "Oregon", "UnitedStates"}]}, AstroRange -> Quantity[1, "AngularDegrees"], PlotLabel -> date], {{date, DateObject[{2023, 10, 14, 9, 20, 0}, "Instant", "Gregorian", "America/Los_Angeles"]}, DateObject[{2023, 10, 14, 8, 0, 0}, "Instant", "Gregorian", "America/Los_Angeles"], DateObject[{2023, 10, 14, 11, 0, 0}, "Instant", "Gregorian", "America/Los_Angeles"], Quantity[1, "Minutes"]}, SynchronousUpdating -> False]

Out[1]= DynamicModule[«8»]
```

---

Visualize the famous eclipse used by Eddington to confirm Einstein's prediction of light deflection:

```wl
In[1]:=
Manipulate[
	AstroGraphics[Entity["Star", "Sun"], AstroReferenceFrame -> {"Equatorial", DateObject[{1919, 5, 29, h}, "Instant"], Entity["Island", "PrincipeIsland"]}, AstroRange -> Quantity[1, "AngularDegrees"]], {h, 7, 12}, SynchronousUpdating -> False]

Out[1]= DynamicModule[«8»]
```

### Possible Issues (1)

Compute the position of Mars on this date:

```wl
In[1]:= date = DateObject[{2024, 7, 12, 3, 30, 0}, TimeZone -> "America/Chicago"];

In[2]:= mars = AstroPosition[Entity["Planet", "Mars"], {"Horizon", date}]

Out[2]=
AstroPosition[{80.96415752609589, 17.58474033282532, 1.6896260380157635}, 
 {"Horizon", "Date" -> DateObject[{2024, 7, 12, 8, 31, 9.184000004317362}, "Instant", "Gregorian", 
    0., "TT"], "Location" -> GeoPosition[{40.11, -88.24}]}, "NorthAzAlt"]
```

By default, the background in ``AstroGraphics`` shows the current region of the sky corresponding to the computed coordinates of Mars, which is not the region of the sky where Mars was on the observation date:

```wl
In[3]:= AstroGraphics[{Red, Point[mars]}]

Out[3]= [image]
```

Specify the date of observation to show the correct region of the sky, near the ecliptic, where Mars was on that date, with the automatic background label for Mars now appearing:

```wl
In[4]:= AstroGraphics[{Red, Point[mars]}, AstroReferenceFrame -> {"Horizon", date}]

Out[4]= [image]
```

## See Also

* [`AstroPosition`](https://reference.wolfram.com/language/ref/AstroPosition.en.md)
* [`GeoGraphics`](https://reference.wolfram.com/language/ref/GeoGraphics.en.md)
* [`Graphics`](https://reference.wolfram.com/language/ref/Graphics.en.md)
* [`AstroAngularSeparation`](https://reference.wolfram.com/language/ref/AstroAngularSeparation.en.md)
* [`AstroDistance`](https://reference.wolfram.com/language/ref/AstroDistance.en.md)
* [`AstroCenter`](https://reference.wolfram.com/language/ref/AstroCenter.en.md)
* [`AstroGridLines`](https://reference.wolfram.com/language/ref/AstroGridLines.en.md)
* [`AstroGridLinesStyle`](https://reference.wolfram.com/language/ref/AstroGridLinesStyle.en.md)
* [`AstroProjection`](https://reference.wolfram.com/language/ref/AstroProjection.en.md)
* [`AstroRange`](https://reference.wolfram.com/language/ref/AstroRange.en.md)
* [`AstroRangePadding`](https://reference.wolfram.com/language/ref/AstroRangePadding.en.md)

## Related Guides

* [Astronomical Computation & Data](https://reference.wolfram.com/language/guide/AstronomicalComputationAndData.en.md)

## History

* [Introduced in 2022 (13.2)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn132.en.md) \| [Updated in 2024 (14.1)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn141.en.md)