Plot a site horizon and celestial targets

Description

Inspect the terrain along a site's horizon and compare it with the apparent paths of candidate celestial targets.

Usage

## S3 method for class 'skyscapeR.horizon'
plot(
  x,
  show.az = (!missing(xrange) || !missing(xlim)),
  xrange,
  yrange,
  obj,
  col.ground = NULL,
  col.sky,
  use.image = TRUE,
  ...,
  show.skyline = NULL,
  sky = NULL,
  xlim,
  ylim,
  fastLoad = FALSE,
  show.legend = TRUE,
  style = NULL
)

Arguments

x

Object of skyscapeR.horizon format.

show.az

Logical that controls whether to display azimuth values or cardinal directions. Defaults to TRUE when xrange is supplied.

xrange

Azimuth range for plotting.

yrange

Altitude range for plotting. By default one degree of altitude occupies the same distance as one degree of azimuth on the device.

obj

A skyscapeR.object from skyObject, or a list of these objects. Each group retains its own epochs and styles for displaying the paths of celestial objects.

col.ground

Silhouette colour. NULL uses a dark muted foreground for natural skies, pale grey-green for publication colour or grey for monochrome.

col.sky

Earlier name for a solid sky colour. Prefer sky.

use.image

Use an attached external panorama PNG when available. Default TRUE. Missing or changed files warn and fall back to the numerical silhouette.

...

Additional arguments to be passed to plot.

show.skyline

Draw the numerical skyline. By default the line appears only without a panorama PNG.

sky

A colour string or a background from sketchSky or stellariumSky.

xlim

Earlier name for xrange.

ylim

Earlier name for yrange.

fastLoad

Use a sampled PNG for quick plots. New photographic imports store a preview. For older horizons the first preview loads the image. The numerical skyline and celestial tracks retain their precision.

show.legend

Display the key for celestial tracks. The angular axes are always drawn.

style

Frame and silhouette style. A sketch supplies its stored style by default. Without a sketch the default is "publication-colour". Other choices are "natural" and "publication-mono". Supplied panorama pixels and sky objects retain their own rendering.

Details

A track meeting the horizon identifies a possible rise or set direction for that declination. The horizontal axis is true bearing and the vertical axis is angular altitude. The function fills the terrain below the stored profile and can overlay diurnal tracks computed for the observing location. Refraction affects those tracks. Rescaling the display or changing its colours does not change the underlying horizon. Add lines or polygons in azimuth and altitude immediately after plotting. Set par(mfrow=c(2,1)) before plotting to stack two horizons.

For a two-year epoch range, draw tracks for the stored minimum and maximum declinations, using the session refraction setting for both tracks. Line styles are taken from the target object; older objects without them use solid lines of width 1.

A horizon with an attached DEM, PeakFinder or photographic PNG displays the image by default. Add show.skyline = TRUE to inspect its numerical profile, or use.image = FALSE to draw the silhouette alone. With xrange supplied, azimuth labels default to degrees. A partial photograph initially opens on its recorded sector. An image-backed horizon or a supplied sky uses a 2:1 plot box. Copy the PNG with the saved horizon and use relinkHor() after moving it. With automatic altitude limits, a 30-degree azimuth sector shows 15 degrees of altitude.

Value

Draws the horizon and returns the session atmosphere invisibly in a list.

Validation

W01 checked the skyline ordinate and azimuth viewport on flat and raised profiles, including natural and publication sky overlays. See the W01 check in the technical manual.

Layers and coordinate consistency

A reusable sky is calculated for its own stored location and instant. Pair it with the horizon used to create it; drawing a saved sky does not recalculate its positions for another observer. Celestial reference tracks from skyObject use the plotted horizon's location and session atmosphere. Keep that atmosphere consistent with the stored sketch when comparing a track with a disc or point symbol.

The foreground masks sky layers geometrically. It does not make the sky object an extinction or visibility calculation through the terrain. Image calibration and numerical skyline agreement remain the responsibility of the horizon source. Azimuth-altitude plotting is a cylindrical display, with increasing horizontal distortion towards the zenith. Retain consistent ranges when comparing styles, epochs or constellation traditions.

Scientific checks

See Also

downloadHWT, skyObject

Examples

# Plot a bundled Maltese horizon:
hor <- malta_horizons[[1]]
plot(hor)

# Add the paths of the solstices and equinoxes sun in the year 1999 BC:
tt <- skyObject('solar extremes', epoch=-2000, col='blue')
plot(hor, obj=tt)
# Compare the bounding tracks across a range of years:
hor <- createHor(c(0,360), c(2,2), loc=c(35,-8,25))
targets <- skyObject('solar extremes', epoch=c("4001 BC", "2001 BC"), col='red')
plot(hor, obj=targets)