Description Usage Arguments Value Author(s) Examples
View source: R/plotDiagPhotoZ.R
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.
1 | plotDiagPhotoZ(photoz, specz, type, npoints)
|
photoz |
vector containing photoz data |
specz |
vector containing spectroscopic redshift data |
type |
a string with one of the following values: |
npoints |
an integer indicating how many points should be used to create the |
ggplot object
Rafael S. de Souza, Alberto Krone-Martins
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.