Tone mapping a two dimensional distribution I'd like to display some two dimensional distributions, but I'm not sure how to properly tone map them. My distributions have some narrow spikes, so linearly mapping the probabilities to color hides most of the information.
I've tried two approaches, doing a gamma adjustment or cutting off high values at some threshold, in both cases I try to target a particular gini distribution for the displayed colors.
The results aren't very good though. I feel that the gamma transforms don't really approximate the inverse CDF of my color distribution. I feel reluctant to use a purely local method, because I don't want to lose all absolute contrast difference. Are there other parametric transforms I could try?
 A: I suggest you try tone mappings which are either logarithmic or evenly quantiled with respect to the probability densities, as opposed to linear, in order to make the non-spiky portions of the pdf surface stand out more.  I've included examples of all three styles (linear, logarithmic, and quantiled) below for side-by-side comparison.  Example R code to produce them is appended below.  Furthermore, you may wish to plot the probability density itself on log scale as well (i.e., make the vertical dimension on a 3D surface plot log scale, while keeping x and y linear) although I haven't bothered to illustrate that here.



library(matlab) # Defines jet.colors()

# Common viewing angle for 3D surface plots
el = 7
az = -35
# Define 2D grid
par(bg = "white")
x <- seq(-20, 20, length = 51)
y <- seq(-20, 20, length = 51)

# Example function to plot, containing large central spike and small
# peripheral ripples
z <- outer(x, y, function(a, b) sin(sqrt(a**2+b**2))**2/(a**2+b**2))
nrz <- nrow(z)
ncz <- ncol(z)
# Generate the desired number of colors from this palette
ncol <- 100
color <- jet.colors(ncol)
# Compute the z-value at the facet centres
zfacet <- (z[-1, -1] + z[-1, -ncz] + z[-nrz, -1] + z[-nrz, -ncz]) / 4

# Recode facet z-values into linear color indices
linfacetcol <- cut(zfacet, ncol)
persp(x, y, z, col = color[linfacetcol], phi = el, theta = az,
      main="Linear Tone Map")

dev.new()
par(bg = "white")
# Recode facet z-values into logarithmic color indices
logfacetcol <- cut(log(zfacet), ncol)
persp(x, y, z, col = color[logfacetcol], phi = el, theta = az,
      main="Logarithmic Tone Map")

dev.new()
par(bg = "white")
# Recode facet z-values into quantiled color indices
qntfacetcol <- cut(zfacet, quantile(zfacet, prob=seq(0, 1, 0.01), na.rm=TRUE))
persp(x, y, z, col = color[qntfacetcol], phi = el, theta = az,
      main="Quantiled Tone Map")

