plotDiagPhotoZ: Plot diagnostics for photometric redshift estimations

Description Usage Arguments Value Author(s) Examples

View source: R/plotDiagPhotoZ.R

Description

plotDiagPhotoZ returns diagnostic plots from the results of photometric redshifts. Different types of plots are available: a density plot of the error distribution (errordist), a predicted versus observed contour plot (predobs), violin plot showing the error distribution at different redshift bins (errorviolins) and a box plot showing the errors at each different redshift bin (box). The produced plots are returned as ggplot2 objects.

Usage

1
plotDiagPhotoZ(photoz, specz, type, npoints)

Arguments

photoz

vector containing photoz data

specz

vector containing spectroscopic redshift data

type

a string with one of the following values: errordist, predobs, errorviolins or box

npoints

an integer indicating how many points should be used to create the predobs plot (if 0, all points will be used)

Value

ggplot object

Author(s)

Rafael S. de Souza, Alberto Krone-Martins

Examples

1
2
3
4
5
6
7
8
9
# First, generate some mock data
ppo <- runif(1000, min=0.1, max=2)
ppo_ph <- rnorm(length(ppo), mean=ppo, sd=0.05)

# Then generate the plots
plotDiagPhotoZ(ppo_ph, ppo, type="errordist")
#plotDiagPhotoZ(ppo_ph, ppo, type="predobs")
#plotDiagPhotoZ(ppo_ph, ppo, type="errorviolins")
#plotDiagPhotoZ(ppo_ph, ppo, type="box")

CosmoPhotoz documentation built on May 29, 2017, 3:59 p.m.