Env var and detection plot functions.
Beginning to translate passive.R into ggvis.